now it' called naive bayes for reason it' naive is because we're assuming that there' no relationships between the words themselves we're just looking at each word in isolationindividually within messageand basically combining all the probabilities of each word' contribution to it being spam or not we're not looking at the relationships between the words so better spam classifier would do thatbut obviously that' lot harder so this sounds like lot of work but the overall idea is not that hardand scikit-learn in python makes it actually pretty easy to do it offers feature called countvectorizer that makes it very simple to actually split up an -mail to all of its component words and process those words individually then it has vmujopnjbm/functionwhere nb stands for naive bayeswhich will do all the heavy lifting for naive bayes for us implementing spam classifier with naive bayes let' write spam classifier using naive bayes you're going to be surprised how easy this is in factmost of the work ends up just being reading all the input data that we're going to train on and actually parsing that data in the actual spam classification bitthe machine learning bitis itself just few lines of code so that' usually how it works outreading in and massaging and cleaning up your data is usually most of the work when you're doing data scienceso get used to the ideajnqpsupt jnqpsujp jnqpsuovnqz gspnqboebtjnqpsu%bub'sbnf gspntlmfbsogfbuvsf@fyusbdujpoufyujnqpsu$pvou fdupsj[fs gspntlmfbsoobjwf@cbzftjnqpsu vmujopnjbm/efgsfbe'jmft qbui gpssppuejsobnftgjmfobnftjoptxbml qbui gpsgjmfobnfjogjmfobnft qbui ptqbuikpjo sppugjmfobnf jo#pez 'bmtf mjoft jppqfo qbuis fodpejoh mbujogpsmjofjog jgjo#pez mjoftbqqfoe mjof fmjgmjof = jo#pez svf