Skip to content

Instantly share code, notes, and snippets.

@shgidi
Last active May 7, 2017 08:53
Show Gist options
  • Save shgidi/bb517df0e1ce5ea29c2ce77aa113e57c to your computer and use it in GitHub Desktop.
Save shgidi/bb517df0e1ce5ea29c2ce77aa113e57c to your computer and use it in GitHub Desktop.
This is generic XGBoost
import xgboost as xgb
clf = xgb.XGBClassifier(max_depth=10, n_estimators=1500,min_child_weight=9,learning_rate=0.01,
nthread=8, subsample=0.80,colsample_bytree=0.80,seed=4242)
clf.fit(trn , y,eval_set=[(val, y_val)], eval_metric='mlogloss', verbose=True, early_stopping_rounds=50)
#multiclass logloss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment