Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Tathagatd96/149c20d8df1e58d07598cb0bb0934c49 to your computer and use it in GitHub Desktop.
Save Tathagatd96/149c20d8df1e58d07598cb0bb0934c49 to your computer and use it in GitHub Desktop.
X_data=data.drop(["Class","Group"],axis=1)
y_data=data["Class"]
dtrain = xgb.DMatrix(X_data,y_data)
params = {
'objective':'binary:logistic',
'max-depth':2,
'silent':1,
'eta':0.5
}
num_rounds = 5
watchlist = [(dtrain,'train')]
bst = xgb.train(params,dtrain,num_rounds,watchlist)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment