Last active
February 12, 2020 21:28
-
-
Save aialenti/773066cb160d771ecc4b1140887a6246 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.metrics import r2_score | |
def xgb_r2_score(preds, dtrain): | |
labels = dtrain.get_label() | |
return 'r2', r2_score(labels, preds) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment