You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi Contributors,
Xgboost is really an exciting tool for data mining. While I am confused with the parameter n_estimator and n_rounds? Per my understanding, both are used as trees numbers or boosting times. But, there is a big difference in predictions. Following are my codes, seek your help. Many thanks.
only n_estimators
clf = XGBRegressor(objective='reg:tweedie',
learning_rate=0.01,
n_estimators=500,
max_depth=6,
gamma=0.5,
subsample=1,
colsample_bytree=0.8,
reg_alpha=1,
missing=None)
xgb_param=clf.get_xgb_params()
dtrain = xgb.DMatrix(x_train,label=y_train)
model = xgb.train(xgb_param,dtrain)
hi Contributors,
Xgboost is really an exciting tool for data mining. While I am confused with the parameter n_estimator and n_rounds? Per my understanding, both are used as trees numbers or boosting times. But, there is a big difference in predictions. Following are my codes, seek your help. Many thanks.
only n_estimators
clf = XGBRegressor(objective='reg:tweedie',
learning_rate=0.01,
n_estimators=500,
max_depth=6,
gamma=0.5,
subsample=1,
colsample_bytree=0.8,
reg_alpha=1,
missing=None)
xgb_param=clf.get_xgb_params()
dtrain = xgb.DMatrix(x_train,label=y_train)
model = xgb.train(xgb_param,dtrain)
codes with n_rounds
clf = XGBRegressor(objective='reg:tweedie',
learning_rate=0.01,
max_depth=6,
gamma=0.5,
subsample=1,
colsample_bytree=0.8,
reg_alpha=1,
missing=None)
xgb_param=clf.get_xgb_params()
n_rounds=500
dtrain = xgb.DMatrix(x_train,label=y_train)
model= xgb.train(xgb_param,dtrain,n_rounds)
Jianju
The text was updated successfully, but these errors were encountered: