October 2017
Beginner to intermediate
572 pages
26h 1m
English
Perform the following steps to classify the churn data with the Naïve Bayes classifier:
> library(e1071)
> classifier=naiveBayes(trainset[, !names(trainset) %in% c("churn")], trainset$churn)
> classifierOutputNaive Bayes Classifier for Discrete PredictorsCall:naiveBayes.default(x = trainset[, !names(trainset) %in% c("churn")], y = trainset$churn)A-priori probabilities:trainset$churn yes no 0.1477322 0.8522678 Conditional probabilities: international_plantrainset$churn no yes yes 0.70467836 0.29532164 no 0.93512418 0.06487582
Read now
Unlock full access