Created
August 14, 2018 20:25
-
-
Save dsilvadeepal/a05045754ac1f2a561bb08d4512645af to your computer and use it in GitHub Desktop.
Naive Bayes Model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Create model from the training dataset | |
sms_classifier <- naiveBayes(sms_train, sms_train_labels) | |
#Make predictions on test set | |
sms_test_pred <- predict(sms_classifier, sms_test) | |
#Create confusion matrix | |
confusionMatrix(data = sms_test_pred, reference = sms_test_labels, | |
positive = "spam", dnn = c("Prediction", "Actual")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment