# Parameters configuration config = configparser.ConfigParser() config.read('config_file/' + config_file) path_data = config[config_type]["path_data"] path_model = config[config_type]["path_model"] name_model = config[config_type]["name_model"] tracks = config[config_type]["tracks"].split(' ') list_features_final = config[config_type]["list_features"].split(' ') flag_save = int(config[config_type]["flag_save"]) ratio_split = list( map(int, config[config_type]["ratio_split_sets"].split(' '))) nbr_cross_val = int(config[config_type]["nbr_cross_validation"]) print('Loading data...') data_win, real_labels, list_states, list_features = tools.load_data_from_dump( path_data) num_track = 0 name_track = tracks[num_track] num_track = taxonomy.index(name_track) # Loop on all the tracks from the taxonomy # for num_track, name_track in enumerate(tracks): # print(name_track) F1_score = [] for n_iter in range(nbr_cross_val): data_train, labels_train, data_test, labels_test, id_train, id_test = tools.split_data_base( data_win, real_labels[num_track], ratio_split)
nbr_component = 15 print('Loading data...') data_win2 = [] real_labels = [[], [], [], []] list_states = [[], [], [], []] tracks = [ 'general_posture', 'detailed_posture', 'details', 'current_action' ] path_annotation = '/home/amalaise/Documents/These/experiments/ANDY_DATASET/AndyData-lab-onePerson/annotations/labels_csv2/' data_win2, real_labels, list_states, list_features = tools.load_data_from_dump( 'score/') if (local_features): list_reduce_features = tools.list_features_local(list_features) for data in data_win2: df_data = pd.DataFrame(data, columns=list_features) data = df_data[list_reduce_features].values # for participant, nbr in zip(list_participant, range(len(list_participant))): # path_data = path_data_root + participant # print('Loading: ' + participant) # list_files = os.listdir(path_data)[0:3] # list_files.sort() # for file in list_files: # name_seq = os.path.splitext(file)[0]