Just another Network site

Machine Learning: Filtering Email for Spam or Ham

Learn how to set up a spam filter using machine learning in today's blog post

  • spam-mail.tr , the correct labels (spam or ham) associated to each training email in TR-mails.zip , where each line tells us the correct label for the specified email id.
  • When the email is raw text, the html property is undefined , and when the email is formatted HTML, then the text property is undefined .
  • then (( emails ) => { // save the first email id and label const [{ id , label }] = emails ; // 2nd step return parseEmail ( ` data / TR / TRAIN_$ { id }.
  • Now that we have our ids and labels, we need to load the email corpus.
  • In the training email with id 1, the body is HTML defined on the html property, so the text property is undefined .

Read the full article, click here.


@codeschool: “Learn how to set up a spam filter using machine learning in today’s blog post”


You may have seen our previous posts on machine learning — specifically, how to let your code learn from text and working with stop words, stemming, and spam.


Machine Learning: Filtering Email for Spam or Ham

Comments are closed, but trackbacks and pingbacks are open.