df['V2'] = 1 df['V3'] = df[which_conc_feature]**2 df['V4'] = df[which_conc_feature]**3 df['V5'] = df[which_conc_feature]**4 else: print("invalid flann. check spelling") return str_path, df str_path, df_normed_expanded = which_flann(df_normed, 'power') #e.g. power/dataout/JV1_1 os.makedirs(str_path + "/" + exp_str + "/figures", exist_ok=True) feature_list = [which_conc_feature, 'V2', 'V3', 'V4', 'V5'] xdftrain, ydftrain, xdftest, ydftest, xtrain, ytrain, xtest, ytest = split_tt( df_normed_expanded, 70, 102, *feature_list) print("Shape of Training feature matrix as array: ", np.shape(xtrain)) print("Shape of Target array: ", np.shape(ytrain)) print("Dimension of training data array: ", np.ndim(xtrain)) print("Dimension of target array: ", np.ndim(ytrain)) #import multi-layer perceptron regressor from sklearn from keras.models import Sequential from keras.layers import Dense, Activation import sklearn.metrics as skm dim_output = 1 dim_input = 5 len_train_input = ytrain.shape[0] #import multi-layer perceptron regressor from sklearn
df['wavelength3']=df[which_conc_feature]**2 df['wavelength4']=df[which_conc_feature]**3 df['wavelength5']=df[which_conc_feature]**4 else: print("invalid flann. check spelling") return str_path, df str_path, df_normed_expanded = which_flann(df_normed, 'chebyshev') 1 os.makedirs(str_path + "/"+ exp_str +"/figures", exist_ok=True) feature_list=[which_conc_feature ,'wavelength2','wavelength3','wavelength4','wavelength5'] xdftrain, ydftrain, xdftest, ydftest, xtrain, ytrain, xtest, ytest = split_tt(df_normed_expanded,70,102, *feature_list) print("Shape of Training feature matrix as array: ",np.shape(xtrain)) print("Shape of Target array: ",np.shape(ytrain)) print("Dimension of training data array: ",np.ndim(xtrain)) print("Dimension of target array: ",np.ndim(ytrain)) from keras.models import Sequential from keras.layers import Dense, Activation import sklearn.metrics as skm dim_output = 1 dim_input = 5 len_train_input = ytrain.shape[0]