This file contains hidden or 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
import lightgbm as lgb | |
from sklearn import metrics | |
def auc2(m, train, test): | |
return (metrics.roc_auc_score(y_train,m.predict(train)), | |
metrics.roc_auc_score(y_test,m.predict(test))) | |
lg = lgb.LGBMClassifier(silent=False) | |
param_dist = {"max_depth": [25,50, 75], | |
"learning_rate" : [0.01,0.05,0.1], |
This file contains hidden or 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
import xgboost as xgb | |
from sklearn import metrics | |
def auc(m, train, test): | |
return (metrics.roc_auc_score(y_train,m.predict_proba(train)[:,1]), | |
metrics.roc_auc_score(y_test,m.predict_proba(test)[:,1])) | |
# Parameter Tuning | |
model = xgb.XGBClassifier() | |
param_dist = {"max_depth": [10,30,50], |
NewerOlder