Description Usage Arguments Value Examples
xgb.rmse is an automatic parameter adjustment function which is applied to the regression task by xgboost.
1 2 3 4 5 6 7 8 9 |
data |
training dataset. xgb.rmse accepts only an |
n |
the number of cycles. |
cvround |
max number of boosting iterations. |
cvfold |
the original dataset is randomly partitioned into |
early_stopping_rounds |
If NULL, the early stopping function is not triggered. If set to an integer k, training with a validation set will stop if the performance doesn't improve for k rounds. |
seed.number |
random number seed. |
nthread |
number of thread used in training. |
a list
contains the best_param,the best_rmse and best_rmse_index.
1 2 3 4 5 6 7 8 | library(xgboost)
data(agaricus.train, package='xgboost')
data(agaricus.test, package='xgboost')
dtrain <- xgb.DMatrix(agaricus.train$data, label = agaricus.train$label)
dtest <- xgb.DMatrix(agaricus.test$data, label = agaricus.test$label)
fit <-xgb.rmse(dtrain,10,cvround=100,cvfold=5,
early_stopping_rounds =10,
seed.number = 12345,nthread = 8)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.