October 2017
Beginner to intermediate
572 pages
26h 1m
English
Perform the following steps to validate the prediction performance of a classification tree:
> predictions = predict(churn.rp, testset, type="class")
> table(testset$churn, predictions)
Output
predictions
yes no
yes 100 41
no 18 859
> library(caret) > confusionMatrix(table(predictions, testset$churn)) Output Confusion Matrix and Statistics predictions yes no yes 100 18 no 41 859 Accuracy : 0.942 95% CI : (0.9259, 0.9556) No Information Rate ...
Read now
Unlock full access