def GetDACC(lag,samples_file,): dacc=DACC(lag) phyche_index = [[0.04,0.06,0.04,0.05,0.04,0.04,0.04,0.04,0.05,0.05,0.04,0.06,0.03,0.05,0.04,0.04], [0.08,0.07,0.06,0.10,0.06,0.06,0.06,0.06,0.07,0.07,0.06,0.07,0.07,0.07,0.06,0.08], [0.07,0.06,0.06,0.07,0.05,0.06,0.05,0.05,0.06,0.06,0.06,0.06,0.05,0.06,0.05,0.07], [6.69,6.80,3.47,9.61,2.00,2.99,2.71,3.47,4.27,4.21,2.99,6.80,1.85,4.27,2.00,6.6], [6.24,2.91,2.80,4.66,2.88,2.67,3.02,2.80,3.58,2.66,2.67,2.91,4.11,3.58,2.88,6.24], [21.34,21.98,17.48,24.79,14.51,14.25,14.66,17.48,18.41,17.31,14.25,21.98,14.24,18.41,14.51,21.34], [1.05,2.01,3.60,0.61,5.60,4.68,6.02,3.60,2.44,1.70,4.68,2.01,3.50,2.44,5.60,1.05], [-1.26,0.33,-1.66,0.00,0.14,-0.77,0.00,-1.66,1.44,0.00,-0.77,0.33,0.00,1.44,0.14,-1.26], [35.02,31.53,32.29,30.72,35.43,33.54,33.67,32.29,35.67,34.07,33.54,31.53,36.94,35.67,35.43,35.02], [-0.18,-0.59,-0.22,-0.68,0.48,-0.17,0.44,-0.22,-0.05,-0.19,-0.17,-0.59,0.04,-0.05,0.48,-0.18], [0.01,-0.02,-0.02,0.00,0.01,0.03,0.00,-0.02,-0.01,0.00,0.03,-0.02,0.00,-0.01,0.01,0.01], [3.25,3.24,3.32,3.21,3.37,3.36,3.29,3.32,3.30,3.27,3.36,3.24,3.39,3.30,3.37,3.25], [-1.00,-1.44,-1.28,-0.88,-1.45,-1.84,-2.17,-1.28,-1.30,-2.24,-1.84,-1.44,-0.58,-1.30,-1.45,-1.00], [-7.60,-8.40,-7.80,-7.20,-8.50,-8.00,-10.60,-7.80,-8.20,-9.80,-8.00,-8.40,-7.20,-8.20,-8.50,-7.60], [-21.30,-22.40,-21.00,-20.40,-22.70,-19.90,-27.20,-21.00,-22.20,-24.40,-19.90,-22.40,-21.30,-22.20,-22.70,-21.30]] vec=dacc.make_dacc_vec(open(samples_file), extra_phyche_index=normalize_index(phyche_index,is_convert_dict=True)) np.savetxt('DHSs_dacc_'+str(lag)+'.txt',vec)
def GetSCPseTNC(lamada, w): sc_psetnc = SCPseTNC(lamada = lamada, w = w) phyche_index = user_indices_3 pos_vec = sc_psetnc.make_scpsetnc_vec(open(samples_file), extra_phyche_index=normalize_index(phyche_index,is_convert_dict=True)) X = array(pos_vec) return X
def GetDAC(instances, k, lag, alphabet, extra_index_file=None, all_prop=False, theta_type=1): dac = DAC(lag) phyche_index = user_indices_2 X = dac.make_dac_vec(open(samples_file), extra_phyche_index=normalize_index(phyche_index, is_convert_dict=True)) return X
def GetPCPseDNC(lamada, w): pc_psednc = PCPseDNC(lamada = lamada, w = w) phyche_index = user_indices_2 pos_vec = pc_psednc.make_pcpsednc_vec(open(samples_file),extra_phyche_index=normalize_index(phyche_index,is_convert_dict=True)) X = array(pos_vec) return X