test: check if the storing of mfcc samples work
This commit is contained in:
parent
39b4841a09
commit
e1c93267c9
@ -517,8 +517,12 @@ class DL_data_handler:
|
|||||||
5: None
|
5: None
|
||||||
}
|
}
|
||||||
|
|
||||||
def get_samples_dict(self):
|
def get_reg_samples_dict(self):
|
||||||
return self.samples_per_subject
|
return self.reg_samples_per_subject
|
||||||
|
|
||||||
|
def get_mfcc_samples_dict(self):
|
||||||
|
return self.mfcc_samples_per_subject
|
||||||
|
|
||||||
|
|
||||||
def get_emg_list(self, subject_nr, session_nr) -> list:
|
def get_emg_list(self, subject_nr, session_nr) -> list:
|
||||||
list_of_emgs = []
|
list_of_emgs = []
|
||||||
@ -626,7 +630,7 @@ class DL_data_handler:
|
|||||||
mfcc_df_i = self.make_mfcc_df_from_session_df(tot_session_df)
|
mfcc_df_i = self.make_mfcc_df_from_session_df(tot_session_df)
|
||||||
subj_samples.append(mfcc_df_i)
|
subj_samples.append(mfcc_df_i)
|
||||||
|
|
||||||
result_df = pd.concat(subj_samples, axis=1, ignore_index=True)
|
result_df = pd.concat(subj_samples, axis=0, ignore_index=True)
|
||||||
self.mfcc_samples_per_subject[subject_nr+1] = result_df
|
self.mfcc_samples_per_subject[subject_nr+1] = result_df
|
||||||
|
|
||||||
|
|
||||||
|
@ -221,12 +221,11 @@ def main():
|
|||||||
csv_handler = CSV_handler()
|
csv_handler = CSV_handler()
|
||||||
csv_handler.load_data('soft')
|
csv_handler.load_data('soft')
|
||||||
dl_data_handler = DL_data_handler(csv_handler)
|
dl_data_handler = DL_data_handler(csv_handler)
|
||||||
emg_list = dl_data_handler.get_emg_list(1, 1)
|
dl_data_handler.store_mfcc_samples()
|
||||||
session_df = dl_data_handler.make_subj_sample(emg_list)
|
dict = dl_data_handler.get_mfcc_samples_dict()
|
||||||
print(session_df)
|
subject1_df = dict.get(5)
|
||||||
df = dl_data_handler.make_mfcc_df_from_session_df(session_df)
|
print(subject1_df)
|
||||||
print(df)
|
print(len(subject1_df.loc[1]))
|
||||||
print(len(df.iloc[0]))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user