LethallyHealthy commited on
Commit
ebef303
·
1 Parent(s): e669638

Update predictor.py

Browse files
Files changed (1) hide show
  1. predictor.py +24 -2
predictor.py CHANGED
@@ -104,10 +104,32 @@ model = lgb.train(params,
104
  callbacks = [early_stopping(300)]
105
  )
106
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  #function to call for predictions
108
  def make_a_prediction(X):
109
- prediction = model.predict(X)
110
- return prediction
 
 
111
 
112
  predictions = make_a_prediction(X_test)
113
  print(predictions)
 
104
  callbacks = [early_stopping(300)]
105
  )
106
 
107
+ #Unoptimized (hand_picked)
108
+ params = {
109
+ 'metric': 'rmse',
110
+ 'boosting_type' : 'gbdt',
111
+ 'objective' : 'regression',
112
+ 'max_depth' : 2,
113
+ 'n_estimators' : 10000,
114
+ 'num_leaves' : 4,
115
+ 'verbose' : 1,
116
+ 'learning_rate': 0.01,
117
+ 'min_data_in_leaf': 100
118
+ }
119
+
120
+
121
+ lgbm = lgb.train(params,
122
+ training_data,
123
+ valid_sets=valid_data,
124
+ early_stopping_rounds=3000
125
+ )
126
+
127
  #function to call for predictions
128
  def make_a_prediction(X):
129
+ opt_prediction = model.predict(X)
130
+ unopt_prediction = lgbm.predict(X)
131
+ predictions = [opt_prediction, unopt_prediction]
132
+ return predictions
133
 
134
  predictions = make_a_prediction(X_test)
135
  print(predictions)