test: check if the storing of mfcc samples work

This commit is contained in:
Skudalen 2021-07-07 11:00:17 +02:00
parent 39b4841a09
commit e1c93267c9
3 changed files with 12 additions and 9 deletions

View File

@ -517,8 +517,12 @@ class DL_data_handler:
5: None
}
def get_samples_dict(self):
return self.samples_per_subject
def get_reg_samples_dict(self):
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:
list_of_emgs = []
@ -626,7 +630,7 @@ class DL_data_handler:
mfcc_df_i = self.make_mfcc_df_from_session_df(tot_session_df)
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

View File

@ -221,12 +221,11 @@ def main():
csv_handler = CSV_handler()
csv_handler.load_data('soft')
dl_data_handler = DL_data_handler(csv_handler)
emg_list = dl_data_handler.get_emg_list(1, 1)
session_df = dl_data_handler.make_subj_sample(emg_list)
print(session_df)
df = dl_data_handler.make_mfcc_df_from_session_df(session_df)
print(df)
print(len(df.iloc[0]))
dl_data_handler.store_mfcc_samples()
dict = dl_data_handler.get_mfcc_samples_dict()
subject1_df = dict.get(5)
print(subject1_df)
print(len(subject1_df.loc[1]))