Skip to content

Instantly share code, notes, and snippets.

@orcaman
Created July 22, 2019 08:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orcaman/330886b981199fe639db278d0710fb47 to your computer and use it in GitHub Desktop.
Save orcaman/330886b981199fe639db278d0710fb47 to your computer and use it in GitHub Desktop.
gmm_xgb_test.predict.py
dsyn = xgb.DMatrix(syn[X_col], syn[y_col], feature_names=X_col)
y_pred = xgb_test.predict(dsyn, ntree_limit=xgb_test.best_iteration+1)
y_true = syn['class'].values
print(recall(y_pred, dsyn))
print(precision(y_pred, dsyn))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment