Update Python documents. (#6376)
This commit is contained in:
@@ -14,15 +14,15 @@ print('running cross validation')
|
||||
# std_value is standard deviation of the metric
|
||||
xgb.cv(param, dtrain, num_round, nfold=5,
|
||||
metrics={'error'}, seed=0,
|
||||
callbacks=[xgb.callback.print_evaluation(show_stdv=True)])
|
||||
callbacks=[xgb.callback.EvaluationMonitor(show_stdv=True)])
|
||||
|
||||
print('running cross validation, disable standard deviation display')
|
||||
# do cross validation, this will print result out as
|
||||
# [iteration] metric_name:mean_value
|
||||
res = xgb.cv(param, dtrain, num_boost_round=10, nfold=5,
|
||||
metrics={'error'}, seed=0,
|
||||
callbacks=[xgb.callback.print_evaluation(show_stdv=False),
|
||||
xgb.callback.early_stop(3)])
|
||||
callbacks=[xgb.callback.EvaluationMonitor(show_stdv=False),
|
||||
xgb.callback.EarlyStopping(3)])
|
||||
print(res)
|
||||
print('running cross validation, with preprocessing function')
|
||||
# define the preprocessing function
|
||||
|
||||
Reference in New Issue
Block a user