How to do it...

Perform the following steps to retrieve the minimum estimation errors via cross-validation with the boosting method:

  1. First, you can use 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))
  1. You can then obtain the confusion matrix from the boosting results:
        > churn.boostcv$confusion
        Output
                       Observed Class
        Predicted Class  yes   no
                    no   119 1940
                    yes  223   33
  1. Finally, you can retrieve the average errors of the boosting method:
        > churn.boostcv$error
        Output
        [1] 0.06565875  
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset