I am running a cross validation with xgboost in R.
library(xgboost)
data(agaricus.train, package='xgboost')
data(agaricus.test, package='xgboost')
train <- agaricus.train
test <- agaricus.test
cv.res <- xgb.cv(data = train$data, label = train$label, nfold = 5,
nrounds = 2, objective = "binary:logistic")
The output is given below
[0] train-error:0.000921+0.000343 test-error:0.001228+0.000687
[1] train-error:0.001075+0.000172 test-error:0.001228+0.000687
I'm assuming the the error is simply the error average between all k-folds when performing regression and the mode when performing classification, is that correct? And what is the second term after the plus sign?
In regression, when computing the average between the k-folds, is it done considering equal weight for each fold or there are some cases where it's done giving more weight to specific folds?