November 2016
Beginner to intermediate
959 pages
43h 46m
English
Similar to the bagging function, adabag provides a cross-validation function for the boosting method, named boosting.cv. In this recipe, we will demonstrate how to perform cross-validation using boosting.cv from the package, adabag.
In this recipe, we continue to use the telecom churn dataset as the input data source to perform a k-fold cross-validation with the boosting method.
Perform the following steps to retrieve the minimum estimation errors via cross-validation with the boosting method:
boosting.cv to cross-validate the training dataset:
> churn.boostcv = boosting.cv(churn ~ ., v=10, data=trainset, mfinal=5,control=rpart.control(cp=0.01))
Read now
Unlock full access