2
$\begingroup$

In the function gbm() there is a parameter cv.folds. I know this is performing cross-validation but what I don't understand is how to interpret it. I tried extracting it using $cv.error but was greeted with a list of values that seemed to only range from 0.75 to ~0.98.

So what exactly is this parameter doing? If I run this function to boost a classifier, is cv.folds returning cross validation error on each classifier?

$\endgroup$

1 Answer 1

2
$\begingroup$

This question can be answered by consulting the documentation:

if cv.folds < 2 this component is NULL. Otherwise, this component is a vector of length equal to the number of fitted trees containing a cross-validated estimate of the loss function for each boosting iteration.

So each of the numbers in your vector is an estimate the loss of a fitted version of your model using one cross validation fold. To interpret the numbers we would need to know what loss function you were using for your gbm.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.