October 2017
Beginner to intermediate
572 pages
26h 1m
English
Perform the following steps:
> install.packages("caret")
> install.packages("C50")
> library(caret)
> library(C50)
> train_control <- trainControl(method="LOOCV") The following command will take some time and may give out some warnings > model<- train(churn~., trControl=train_control, method="nb") > model Output Naive Bayes 3333 samples 19 predictor 2 classes: 'yes', 'no' No pre-processing Resampling: Leave-One-Out Cross-Validation Summary of sample sizes: 3332, 3332, 3332, 3332, 3332, 3332, ... Resampling results across tuning parameters: usekernel Accuracy Kappa FALSE 0.6066606661 0.1091075239 TRUE 0.8550855086 0.0000000000 ...
Read now
Unlock full access