def main(): hsic_lasso = HSICLasso() hsic_lasso.input("../tests/test_data/csv_data_mv.csv", output_list=['output1', 'output2']) hsic_lasso.regression(5) hsic_lasso.dump() hsic_lasso.plot_path()
def main(): #Numpy array input example hsic_lasso = HSICLasso() data = sio.loadmat("../tests/test_data/matlab_data.mat") X = data['X'].transpose() Y = data['Y'][0] featname = ['Feat%d' % x for x in range(1, X.shape[1] + 1)] hsic_lasso.input(X, Y, featname=featname) hsic_lasso.regression(5) hsic_lasso.dump() hsic_lasso.plot_path() #Save parameters hsic_lasso.save_param()
def main(): hsic_lasso = HSICLasso() #out_list = ['c'+str(i) for i in range(1,51)] #print (out_list) hsic_lasso.input("./user_data_new.csv", output_list=[ 'c1', 'c2', 'c3', 'c4', 'c5,', 'c6', 'c7', 'c8', 'c9', 'c10' ]) # ,'c11', 'c12', 'c13', 'c14', 'c15,', 'c16', 'c17', 'c18', 'c19', 'c20','c21', 'c22', 'c23', 'c24', 'c25,', 'c26', 'c27', 'c28', 'c29', 'c30']) hsic_lasso.regression(100, B=50) hsic_lasso.dump() select_index = hsic_lasso.get_index() print(select_index) print(hsic_lasso.get_index_score()) #hsic_lasso.plot_path() print(hsic_lasso.get_features()) X_select = hsic_lasso.X_in[select_index, :] np.savetxt('X_select.txt', X_select, fmt=str('%.5f'), encoding='utf-8')
from pyHSICLasso import HSICLasso hsic_lasso = HSICLasso() hsic_lasso.input("SNR-26415.csv") print(hsic_lasso.classification(100)) hsic_lasso.get_features() l = [] l.append(hsic_lasso.get_features()) print(hsic_lasso.get_features()) print(len(l)) temp = 0 hsic_lasso.dump() for i in range(0, len(l)): print(l[i]) temp = temp + 1 print(temp)
def main(): hsic_lasso = HSICLasso() hsic_lasso.input("../tests/test_data/matlab_data.mat") hsic_lasso.regression(5) hsic_lasso.dump() hsic_lasso.plot_path()