October 2017
Beginner to intermediate
572 pages
26h 1m
English
Perform the following steps to generate a classification measurement:
> svm.model= train(churn ~ .,
+ data = trainset,
+ method = "svmRadial")
> svm.pred = predict(svm.model, testset[,! names(testset) %in% c("churn")])
> table(svm.pred, testset[,c("churn")])
Output
svm.pred yes no
yes 73 16
no 68 861
> confusionMatrix(svm.pred, testset[,c("churn")]) Output Confusion Matrix and Statistics Reference Prediction yes no yes 73 16 no 68 861 Accuracy ...Read now
Unlock full access