コード例 #1
0
data_df = pu.match_label_with_sample(data_df, valence_list)
#data_df = pu.match_label_with_sample(data_df,arousal_list,col_name='arousal')

#%% plot scatter matrix
fig = ff.create_scatterplotmatrix(data_df[[0, 1, 12, 13, 'label']],
                                  diag='histogram',
                                  index='label',
                                  height=1000,
                                  width=1000)

plotly.offline.plot(fig)

#%%
##iaps_class = iaps(r"C:\Users\DSPLab\Research\affective-monitor-model\preprocessing\IAPSinfoFile_Final.txt")
iaps_class = iaps(r"E:\Research\affective-monitor-model\preprocessing")
sample_list_from_pic_id = iaps_class.get_sample_idx(2141)
feel_df = iaps_class.get_feeling('happy')

#%%
#path = "C:\\Users\\DSPLab\\Research\\ExperimentData"
path = "E:\\Research\\ExperimentData"
n = 1
subjects = [i for i in range(1, n + 1)]

#%% get data
#faps_df = pfap.get_faps()
#FAP_index = ['l_i_eyebrow_y','r_i_eyebrow_y','l_o_eyebrow_y','r_o_eyebrow_y',
#                 'l_i_eyebrow_x','r_i_eyebrow_x','t_l_eyelid_y','t_r_eyelid_y',
#                 'l_cheeck_y','r_cheeck_y','l_nose_x','r_nose_x',
#                 'l_o_cornerlip_y','r_o_cornerlip_y','l_o_cornerlip_x','r_o_cornerlip_x',
コード例 #2
0
# -*- coding: utf-8 -*-

from preprocessing.iaps import iaps

iaps_class = iaps()
print(iaps_class.get_pic_id(0))
print(iaps_class.get_sample_idx(1050))
コード例 #3
0
#%%
# scatter plot matrix
#fig = data_df[['mean','max','median','min','skew']].reset_index(drop=True).scatter_matrix(asFigure=True)
#plotly.offline.plot(fig)

fig = ff.create_scatterplotmatrix(
    data_df[['mean', 'max', 'median', 'min', 'skew', 'label']],
    diag='histogram',
    index='arousal',
    height=1000,
    width=1000)

plotly.offline.plot(fig)

#%%
iaps_class = iaps(
    r"C:\Users\DSPLab\Research\affective-monitor-model\preprocessing")
#iaps_class = iaps(r"E:\Research\affective-monitor-model\preprocessing\IAPSinfoFile_Final.txt")
iaps_df = iaps_class.iaps_df
pic_id_max_arousal = iaps_df.loc[iaps_df['arousal_m'].idxmax()]['pic_id']
pic_id_min_arousal = iaps_df.loc[iaps_df['arousal_m'].idxmin()]['pic_id']
list_max_idx = iaps_class.get_sample_idx(6550)
list_min_idx = iaps_class.get_sample_idx(1419)
final_list = list_max_idx + list_min_idx

# get samples
import preprocessing.pd as ppd
pd_signals = ppd.get_pds(pickle_file='data_1_51.pkl')
illum_mean_df = utils.load_object('illum_mean.pkl')
depth_mean_df = utils.load_object('depth_mean.pkl')

# remove glitch