python package refactor into python-package

This commit is contained in:
tqchen
2015-07-30 22:04:45 -07:00
parent f6fed76e7e
commit c2fec29bfa
13 changed files with 87 additions and 677 deletions

View File

@@ -75,13 +75,3 @@ clf = xgb.XGBClassifier()
clf.fit(X_train, y_train, early_stopping_rounds=10, eval_metric="auc",
eval_set=[(X_test, y_test)])
# Custom evaluation function
from sklearn.metrics import log_loss
def log_loss_eval(y_pred, y_true):
return "log-loss", log_loss(y_true.get_label(), y_pred)
clf.fit(X_train, y_train, early_stopping_rounds=10, eval_metric=log_loss_eval,
eval_set=[(X_test, y_test)])