Skip to content
Snippets Groups Projects
Commit 9212f77a authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 66f856bc
Branches
No related tags found
No related merge requests found
......@@ -252,3 +252,13 @@ def gradient_boosting(x_train, y_train, x_test, y_test, n_estimators=100, max_de
if saveModel:
joblib.dump(gbm, '/Users/tomrink/icing_gbm.pkl')
def infer(model, x_test, y_test, does_prob=True):
yhat = model.predict(x_test)
if does_prob:
yhat_prob = model.predict_proba(x_test)
metrics(y_test, yhat, y_pred_prob=yhat_prob)
else:
metrics(y_test, yhat)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment