num_outputs = 18 other_param_dict = {'num_epochs' : 50, 'batch_size' : 200, 'normalize' :1 , 'dropout' : 0, 'fp_depth': 4, 'activation' :relu, #'fp_type' : 'morgan', 'fp_type' : 'neural', 'save_weights' : False, 'h1_size' : 100, 'conv_width': 20, 'num_outputs': num_outputs, 'init_bias': 0.85} #learn rate, init scale, # Neural 1, 100 runs, norm # Parameters are : learn rate, init scale, and fingerpritn length RE = rxn_estimator( -3.7708613280344383, -3.5680734313359697, 142, other_param_dict) train_input_1 = pkl.load(open("../../data/200each/balanced_200each_train_inputs_1.dat")) train_targets = pkl.load(open("../../data/200each/balanced_200each_train_targets.dat")) print 'beginning training' start = time.time() RE.fit(train_input_1, train_targets) print 'end of training' print 'run time: ', time.time() - start batch_nm = 'exam_200each' method = other_param_dict['fp_type']+'1'
'h1_size': 100, 'conv_width': 20, 'num_outputs': num_outputs, 'init_bias': 0.85 } #learn rate, init scale, # Morgan 1: # Change to correct value (I deleted unfortunately...) #RE = rxn_estimator(-2.9980333058185202, -4.92986261217202, 153, other_param_dict) # Morgan 2: #RE = rxn_estimator(-3.7771145904698447, -4.3688416048512435, 752, other_param_dict) # Morgan 3: RE = rxn_estimator(-3.9815288594632183, -3.5896897128869263, 767, other_param_dict) # Neural 1: #RE = rxn_estimator( -3.2721919214871984, -2.3649628009746966, 148, other_param_dict) #Neural 2: #RE = rxn_estimator(-3.6682766762789663, -3.1635758381500736, 156, other_param_dict) train_input_1 = pkl.load( open( "/home/jennifer/Documents/DeepMolecules-master/reaction_learn/Classification_3_1/data/200each/balanced_200each_train_inputs_1.dat" )) train_targets = pkl.load( open( "/home/jennifer/Documents/DeepMolecules-master/reaction_learn/Classification_3_1/data/200each/balanced_200each_train_targets.dat" ))
def hyperopt_train_test(params): clf = rxn_estimator(np.float32(params[0]), np.float32(params[1]), np.int(params[2]), other_param_dict) return cross_val_score(clf, X, y, cv=3).mean()
'batch_size': 100, 'normalize': 1, 'dropout': 0, 'fp_depth': 4, 'activation': relu, 'fp_type': 'morgan', #'fp_type' : 'neural', 'save_weights': False, 'h1_size': 100, 'conv_width': 20, 'num_outputs': num_outputs, 'init_bias': 0.85 } # Parameters are : learn rate, init scale, and fingerpritn length RE = rxn_estimator(-3.418366537208893, -3.435202814263662, 563, other_param_dict) train_input_1 = pkl.load( open("../../data/200each/balanced_200each_train_inputs_1.dat")) train_targets = pkl.load( open("../../data/200each/balanced_200each_train_targets.dat")) print 'beginning training' start = time.time() RE.fit(train_input_1, train_targets) print 'end of training' print 'run time: ', time.time() - start print 'loading weights, begin prediction'