Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 1.25 KB

section_homework_naive_bayes.md

File metadata and controls

40 lines (30 loc) · 1.25 KB

Homework

Implement spam filtering using naive bayes

Notes:

Enter text to classify, empty to quit: later friend
P(spam | "later friend"): 1.3958381774904292%
P(ham | "later friend"): 98.60416182250957%
"later friend" is not spam

Enter text to classify, empty to quit: free nokia mobile
P(spam | "free nokia mobile"): 99.990687845424%
P(ham | "free nokia mobile"): 0.009312154575997407%
"free nokia mobile" is spam

Enter text to classify, empty to quit:

Notes:

Homework

  • Build a Spam Classifier using Naive Bayes
  • Use the provided setup, make sure to read README.md
  • Use data.txt for training
  • Implement the required probability calculation formulas
  • Carefully think about what you can pre-calculate during start-up to save time when classifying
  • Your application should be able to handle millions of texts
  • Focus on correct implementation of the required formulas
  • Use the provided CLI to manually test your application (see README.md)
  • Ensure that the provided test cases run successfully (see README.md)

Notes: