Building A Spam Filter With Naive Bayes in R
In this course, we learned about Conditional Probability and different techniques that enable us to better estimate probabilities. We also learned about Bayes’ Theorem and the Naive Bayes Algorithm.
In this guided project, we’ll create a spam filter for SMS messages. To do that, we’ll use a data set of 5,572 SMS messages that are already classified by humans. The data set was put together by Tiago A. Almeida and José María Gómez Hidalgo, and it can be downloaded from The UCI Machine Learning Repository.
Working on guided projects will give you hands-on experience with real world examples, so we encourage you to not only complete them, but to take the time to really understand the concepts.
These projects are meant to be challenging to better prepare you for the real world, so don’t be discouraged if you have to refer back to previous missions.
As with all guided projects, we encourage you to experiment and extend your project, taking it in unique directions to make it a more compelling addition to your portfolio!
- Use conditional probability concepts in a practical setting.
- Add business value using conditional probability and Naive Bayes.
- Exploring the Data Set
- Training, Cross-Validation and Test Sets
- Data Cleaning
- Creating the Vocabulary
- Calculating Constants First
- Calculating Parameters
- Classifying A New Message
- Hyperparameter Tuning and Cross-validation
- Test Set Performance
- Next Steps