Saturday, March 20, 2010

Creating Spam Filter using Naive Bayes Classifier

Few months ago I gave a lecture to CS students about data mining. I decided to show how a spam filter can be built using simple data mining technique called naive bases classifier. It was an interactive lecture and I was surprised by the students' interest in the field and the questions that they asked.

Since the intention was to keep things simple, I used a simple example to walk them through the steps of creating a spam filter (see the slides embedded below). It was an exciting and rewarding experience. The most interesting part was when I asked for suggestion regarding the types of features which should be extracted for spam filtering. I was hoping to hear something like "individual words", "email addresses", etc and they indeed were among the responses that I got. But I wasn't expecting them to suggest taking into account "case sensitivity", "color scheme", "co-0ccurance" and "spelling" of words in email body. These responses were from undergrads who were mostly new to the idea of data mining. The curiosity and in-depth knowledge of these students made the lecture very enjoyable.

Here are the slides:

80 comments:

  1. Hello Mr. Rizvi,

    You Lecture was really helpful in getting my assignment done. I think there is a mistake on slide 13. P(John|Ham) should be 7/20 instead of 7/30?

    What do you think?

    ReplyDelete
  2. @Anonymous,
    You are right! P(John|Ham) should should be 7/20. Thanks for pointing out the mistake. I have made the change in google docs as well.

    ReplyDelete
  3. Setting an model is not the sheer means of influencing another, it is the however means.

    ReplyDelete
  4. Nice brief and this mail helped me alot in my college assignement. Thank you for your information.

    ReplyDelete
  5. Cool web site, I had not come across raza-rizvi.blogspot.com previously in my searches!
    Continue the superb work!

    ReplyDelete
  6. Good evening

    Awesome post, just want to say thanks for the share

    ReplyDelete
  7. Hello there,

    Thanks for sharing this link - but unfortunately it seems to be down? Does anybody here at raza-rizvi.blogspot.com have a mirror or another source?


    Thanks,
    Thomas

    ReplyDelete
  8. [b][url=http://www.bestbagsonlinestore.com/]louis vuitton purses[/url][/b] Im not the sort of individual, having said that, who likes to take a seat there and state that of course, you should use a purse, without providing an excellent reason behind it. So for the weekend I decided to go devoid of applying my Louis Vuitton bag or perhaps a wallet. Listed here is what occurred. If easy and stable control of all incoming and outgoing calls is vital on your company's achievements, chances are you'll do perfectly to include the ADIX voice and data communication technique. It may possibly cope with an enormous variety of digital information and facts details which is created to incorporate, not exchange, expansion modules if a business wishes to own excess ports. This voice messaging technique is great for small-room inns and motels, bed and breakfasts as well as a range of small organization forms..

    [b][url=http://www.outletonlinestore.co.uk/]louis vuitton outlet[/url][/b] 1. By no means prevent making use of for get the job done. There is a inclination among freelancers to go away off the task purposes once we look for a few of customers. In some unspecified time in the future, there might be such designer organizations that offer couture marriage ceremony stationery. Most likely Vera Wang will start off her quite very own line. She has published about quite a few facets of this matter which include Marriage ceremony Stationery.

    [b][url=http://www.uggsclearanceonline.co.uk/]www.uggsclearanceonline.co.uk[/url][/b] Through an ever-increasing range of electronic gadgets flooding our properties, the difficulty of supplying power to everything could become a real head scratcher. That is specifically accurate in more mature households, which had been built (and wired for electricity) with a a lot distinct set of desires in mind. Numerous previous residences have a single to two wall outlets in each and every area, offering place for barely over some lamps..
    Care for your nails, hardly ever bite them! When you do, prevent today! Dress in faux nails when you've got been biting them and they are quick. Dress in a French manicure. You have to act like "Man, I'm amazing!" and just get it done! Walk the walk- the "model" stroll with 1 foot facing one other with best posture.

    [b][url=http://www.outletonlinestore.co.uk/]www.outletonlinestore.co.uk[/url][/b] Wordpress consumers get to host their own individual weblogs inside of a language in their decision also. They could also layout their own blogs by using any concept of their preference. They're able to also make your mind up within the widgets necessary for their site. Mens buckles have fallen a long training course inside the times on the checklist of confederate soldier or western cowpoke. While in the past, it certainly was began out for that achieve to maintain maximize jeans or clutch your coat on. At present Hermes belts sale, this lower lv belts reversible belt has morphed into a gadget with several capabilities.

    [b][url=http://www.uggsclearanceonline.co.uk/]uggs clearance[/url][/b] Themes generally have a time frame from which they may be primarily based all around. Themes can very last from one particular week all the strategy to a single month relying on how in depth you would like to strategy your concept. I would recommend working with a theme no longer than two weeks with the homeschool little one.

    ReplyDelete
  9. top [url=http://www.c-online-casino.co.uk/]casino online[/url] coincide the latest [url=http://www.casinolasvegass.com/]casino games[/url] manumitted no store reward at the best [url=http://www.baywatchcasino.com/]www.baywatchcasino.com
    [/url].

    ReplyDelete
  10. After getting more than 10000 visitors/day to my website I thought your raza-rizvi.blogspot.com website also need unstoppable flow of traffic...

    Use this BRAND NEW software and get all the traffic for your website you will ever need ...

    = = > > http://get-massive-autopilot-traffic.com

    In testing phase it generated 867,981 visitors and $540,340.

    Then another $86,299.13 in 90 days to be exact. That's $958.88 a
    day!!

    And all it took was 10 minutes to set up and run.

    But how does it work??

    You just configure the system, click the mouse button a few
    times, activate the software, copy and paste a few links and
    you're done!!

    Click the link BELOW as you're about to witness a software that
    could be a MAJOR turning point to your success.

    = = > > http://get-massive-autopilot-traffic.com

    ReplyDelete
  11. [url=http://longchampbagsd.hatenablog.com/]sac longchamp[/url] Annie Handbags are Follow the fashion Mulberry Albert Satchel Natural Leather Messenger Bag Light Coffee for Men,you can buy Mulberry Bags on our Mulberry Bags Outlet some of the most luxurious, classic and fashion forward handbags on the market. Annie Diamantidis is the designer behind the Annie Handbags line and she has created timeless pieces that are heirloom quality. Annie Handbags are made from exotic skins such as crocodile, python and ostrich, soft calfskin leather, suede interior lining and 14K gold-plated hardware..
    [url=http://longchamppaschers.wallinside.com/]longchamp soldes[/url] Also, if it is a true allergy, puffy eyes could be the least of your troubles. It should not be used as a substitute for professional medical advice, diagnosis or treatment. LIVESTRONG is a registered trademark of the LIVESTRONG Foundation. Usually the texture will be very gloppy and tacky, not painting in thin smooth layers. If it clumps, you should dump it. Winter fashion trends change every year. It is important to stay up to date on the newest hot winter fashion trends in order to be dressed in style. But don't forget buy the item - Highly Appreciated Mulberry Women's Bayswater Snake Print Leather Shoulder Light Coffee Bag. Anything that suddenly makes you itch or break out should also go away.
    [url=http://saclongchampa.shutterfly.com/]sacs longchamp pas cher[/url] Their wide range of bags reflects the taste of the urban women which has with time changed a lot. Paul's designer bags are a hit with women of all ages. They cater to all age groups Shop the Mulberry clothing Collection at Flannels, Coveted Mulberry Women's Small Bayswater Satchel Light Coffee Bag in cheap price and have a piece for all. marvel always giv . After investing so much of money on a billboard table, and spending so many pleasant memories with it, you dont want anything to happen to i . Keeping American cockroaches out of your home is an on-going process, not a one-time treatment.. The threads in duck are going to be more tightly woven. In the United States, canvas is classified in two ways. The first way is by weight (ounces per square yard). It doesn't matter how much money your business might make down the road if you can't get out of your garage. Plenty of business plans boast hockey-stick-style financial projections but run out of cash before the good times kick in. (Remember all those busted dot-com companies from the tech boom?) Three words: Mind the cash...

    ReplyDelete
  12. It agree, the useful message
    What rare good luck! What happiness!
    You were not mistaken, truly
    Whom can I ask?
    Thanks for an explanation.

    [url=http://yaba.com/mkbagcheap2/blog/45302/][b]michael kors outlet online[/b][/url]
    [url=http://shenenmaoyipo.exteen.com/20130117/how-to-pick-an-ideal-handbag-for-the-promenade][b]michael kors outlet online[/b][/url]
    [url=http://cheapbagmk2.soup.io/][b]michael kors outlet online[/b][/url]
    [url=http://shenenmaoyiww.xanga.com/771226903/skip-hop-baby-bags/][b]michael kors outlet online[/b][/url]
    [url=http://shenenmaoyizzz.futblog.com.br/][b]michael kors outlet online[/b][/url]

    ReplyDelete
  13. I'm not sure why but this website is loading incredibly slow for me. Is anyone else having this problem or is it a problem on my end? I'll check
    back later and see if the problem still exists.


    Feel free to visit my page: 激安プラダ バッグ

    ReplyDelete
  14. Thanks in favor of sharing such a nice opinion, post is nice, thats why
    i have read it fully

    Feel free to visit my web page; ロレックスレプリカ

    ReplyDelete
  15. If you are going for most excellent contents like I do,
    just go to see this web site all the time because it offers quality contents, thanks

    Here is my blog post: ロレックスコピー

    ReplyDelete
  16. Good information. Lucky me I found your website by accident (stumbleupon).
    I have book marked it for later!

    Visit my blog post; rolexスーパーコピー

    ReplyDelete
  17. Keep this going please, great job!

    Feel free to surf to my web-site ロレックスレプリカ

    ReplyDelete
  18. Excellent web site. Lots of useful information here.
    I am sending it to some friends ans additionally sharing in delicious.
    And naturally, thank you for your effort!

    My web site: ロレックススーパーコピー

    ReplyDelete
  19. I couldn't refrain from commenting. Exceptionally well written!

    Have a look at my web page zakhir.blogspot.com

    ReplyDelete
  20. Hello it's me, I am also visiting this web page regularly, this web site is actually fastidious and the visitors are really sharing good thoughts.

    my site - ロレックスレプリカ

    ReplyDelete
  21. Appreciate the recommendation. Will try it out.

    Also visit my site ... グッチ バッグ

    ReplyDelete
  22. Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my
    blog that automatically tweet my newest twitter updates. I've been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

    Here is my web blog ... グッチ バッグ

    ReplyDelete
  23. Valuable information. Lucky me I found your website by accident, and
    I am shocked why this accident didn't came about earlier! I bookmarked it.

    Feel free to visit my weblog: グッチ バッグ

    ReplyDelete
  24. all the time i used to read smaller articles which as well clear their motive, and that is also happening with this paragraph which I am reading at this time.



    Also visit my website :: www.guccihandbagsoutletsalee.com

    ReplyDelete
  25. Admiring the dedication you put into your site and in depth information you offer.

    It's great to come across a blog every once in a while that isn't the same outdated rehashed information.
    Wonderful read! I've saved your site and I'm including your RSS feeds to my Google account.


    Here is my page :: http://www.christianlouboutinoutletstorex2013.com

    ReplyDelete
  26. It's perfect time to make some plans for the future and it's time
    to be happy. I have read this post and if I could I wish to suggest you few
    interesting things or tips. Maybe you could write next articles referring to this article.

    I desire to read more things about it!

    Look into my webpage: http://www.toryburchoutletstore2013.com

    ReplyDelete
  27. Thank you for sharing your info. I really
    appreciate your efforts and I will be waiting for your
    next write ups thanks once again.

    Look into my website ミュウミュウ 店舗

    ReplyDelete
  28. I visited various sites except the audio feature for audio songs existing at
    this site is genuinely marvelous.

    my homepage; http://www.pradaoutlet-sales.com

    ReplyDelete
  29. This piece of writing is truly a nice one it helps new net people,
    who are wishing for blogging.

    my web page - オークリー

    ReplyDelete
  30. We are a bunch of volunteers and opening a new scheme in
    our community. Your web site offered us with useful information to work on.
    You've done a formidable task and our entire neighborhood shall be grateful to you.

    Review my web site - エアジョーダン

    ReplyDelete
  31. Hello, Neat post. There's an issue with your site in internet explorer, may test this? IE nonetheless is the market chief and a good component of people will pass over your excellent writing due to this problem.

    Here is my web page; prada バッグ

    ReplyDelete
  32. I don't write a great deal of comments, however i did some searching and wound up here "Creating Spam Filter using Naive Bayes Classifier". And I do have 2 questions for you if it's allright.
    Could it be just me or does it give the impression like a few of the comments
    look as if they are written by brain dead
    folks? :-P And, if you are writing on other places, I would
    like to keep up with everything new you have to post.
    Would you list of the complete urls of all your communal pages like your twitter feed,
    Facebook page or linkedin profile?

    Stop by my webpage ... レイバンサングラス

    ReplyDelete
  33. Woah! I'm really digging the template/theme of this blog. It's
    simple, yet effective. A lot of times it's hard to get that "perfect balance" between user friendliness and appearance. I must say you have done a very good job with this. Additionally, the blog loads very fast for me on Chrome. Excellent Blog!

    My homepage :: samsung galaxy s3 wallet case

    ReplyDelete
  34. Ηelpful information. Fortunate me I found your wеbѕіte acсidеntally,
    anԁ I am shockeԁ why this accident didn't happened in advance! I bookmarked it.

    My homepage: iphone 4 accessories

    ReplyDelete
  35. Undenіably believе thаt which уοu statеd.

    Yоur fаvοrite justifіcation apреaгed to bе on the net the
    easiеst thing to bе aωaгe of.
    I say to you, Ι certainly get іrκed while peοple think about woгrіes that
    they plainly do not κnοw about. You managed to hit the naіl upon the top and ԁefined out thе
    whole thing without havіng side effeсt ,
    pеoplе cаn take a signal. Will probablу be back tο get more.
    Thanκs

    My website; unusual Iphone 4 Cases

    ReplyDelete
  36. It's not my first time to pay a visit this website, i am browsing this site dailly and take nice information from here every day.

    My homepage - ncm.gu.se

    ReplyDelete
  37. Thanks for another informative blog. The place else may just
    I am getting that kind of info written in such an ideal way?
    I have a project that I'm simply now working on, and I've been at the look out for such information.



    Check out my blog post - トリーバーチ財布

    ReplyDelete
  38. I'm amazed, I have to admit. Rarely do I come across a blog that's both equally educative and amusing, and let me tell you, you have hit the
    nail on the head. The problem is something that not enough people are
    speaking intelligently about. I am very happy I found this during my search for something regarding this.


    Stop by my site トリーバーチ

    ReplyDelete
  39. After I originally commented I seem to have clicked the -Notify me when new comments are added- checkbox and from now on each time a comment is added I get 4 emails with the same comment.
    Is there an easy method you can remove me from that service?
    Thanks!

    Check out my web-site - miu miu 店舗

    ReplyDelete
  40. I do agree with all the concepts you've introduced on your post. They are very convincing and can definitely work. Nonetheless, the posts are very quick for beginners. Could you please prolong them a little from subsequent time? Thank you for the post.

    Here is my page: http://www.toryburchoutletshopx.com/

    ReplyDelete
  41. I visit every day some sites and blogs to read content, however this weblog offers quality based posts.


    Here is my page - chloe バッグ

    ReplyDelete
  42. Greetings! I know this is kinda off topic but I was wondering which blog platform are you
    using for this website? I'm getting tired of Wordpress because I've had problems with hackers and I'm looking at options for another platform. I would be awesome if you could point me in the direction of a good platform.

    my web page ... miu miu 財布

    ReplyDelete
  43. I am really impressed with your writing skills as well as with
    the layout on your blog. Is this a paid theme or did you customize it
    yourself? Anyway keep up the nice quality writing, it's rare to see a great blog like this one nowadays.

    Here is my website; chloe バッグ

    ReplyDelete
  44. Very nice post. I just stumbled upon your blog and wished to say that I have really enjoyed surfing around your blog posts.

    In any case I'll be subscribing to your rss feed and I hope you write again very soon!

    Here is my homepage ... クロエ ハンドバッグ

    ReplyDelete
  45. Thanks for finally writing about > "Creating Spam Filter using Naive Bayes Classifier"
    < Liked it!

    Here is my site :: クロエ店舗

    ReplyDelete
  46. Way cool! Some very valid points! I appreciate you writing this post and the rest of the website is very good.


    Here is my web site: クロエ店舗

    ReplyDelete
  47. I am not sure where you are getting your info, but good topic.

    I needs to spend some time learning much more or
    understanding more. Thanks for wonderful info I was looking for this info for
    my mission.

    Here is my webpage miu miu 新作

    ReplyDelete
  48. There's certainly a great deal to find out about this subject. I love all of the points you made.

    my webpage; Cheap Christian Louboutin

    ReplyDelete
  49. Hmm is anyone else having problems with the images on this blog loading?
    I'm trying to figure out if its a problem on my end or if it's the blog.
    Any suggestions would be greatly appreciated.

    Also visit my site - ルブタンアウトレット

    ReplyDelete
  50. Hey! Someone in my Facebook group shared this website with us so
    I came to check it out. I'm definitely loving the information. I'm bookmarking and will
    be tweeting this to my followers! Great blog and brilliant design.


    my webpage ... monster beats

    ReplyDelete
  51. Terrific post however I was wondering if you could write a
    litte more on this subject? I'd be very thankful if you could elaborate a little bit further. Appreciate it!

    Take a look at my blog post; http://mybabybutterfly.co.za/index.php/single-beds/item/35-carbed-351-r/35-carbed-351-r

    ReplyDelete
  52. Wow that was strange. I just wrote an incredibly long comment but after
    I clicked submit my comment didn't show up. Grrrr... well I'm not writing all that over again.
    Anyways, just wanted to say wonderful blog!

    Feel free to visit my webpage ... malthead.blogspot.fr

    ReplyDelete
  53. I do not even know how I ended up here, but I thought
    this post was great. I don't know who you are but definitely you are going to a famous blogger if you aren't already ;) Cheers!


    Feel free to surf to my blog post - monster beats

    ReplyDelete
  54. Great blog! Do you have any helpful hints for aspiring writers?
    I'm planning to start my own site soon but I'm a
    little lost on everything. Would you suggest starting
    with a free platform like Wordpress or go for a paid
    option? There are so many options out there that I'm totally confused .. Any suggestions? Appreciate it!

    my weblog :: モンスタービート

    ReplyDelete
  55. Thank you for the good writeup. It in fact was a amusement account it.

    Look advanced to more added agreeable from you! However, how could we communicate?


    Here is my web-site: クリスチャンルブタン

    ReplyDelete
  56. If you are going for most excellent contents like I do, just pay a quick visit this
    web page all the time for the reason that it presents feature contents, thanks

    my website - ルブタン

    ReplyDelete
  57. Do you have a spam issue on this website; I also am a blogger,
    and I was wondering your situation; we have developed some nice methods and we are looking to trade strategies
    with others, please shoot me an email if interested.



    My blog - クリスチャンルブタンメンズ

    ReplyDelete
  58. Oh my goodness! Impressive article dude! Thank you, However I am experiencing issues with your RSS.
    I don't know why I cannot subscribe to it. Is there anyone else getting similar RSS problems? Anybody who knows the answer will you kindly respond? Thanx!!

    My page :: トリーバーチ

    ReplyDelete
  59. Hello there! I know this is somewhat off topic but
    I was wondering if you knew where I could find a captcha plugin for my comment form?
    I'm using the same blog platform as yours and I'm having trouble finding
    one? Thanks a lot!

    my blog; クロエ 公式

    ReplyDelete
  60. Hello, i think that i saw you visited my weblog so i
    came to “return the favor”.I am trying to find things to improve my web site!
    I suppose its ok to use some of your ideas!!

    My web-site; クリスチャンルブタン

    ReplyDelete
  61. Thanks for sharing your info. I really appreciate your
    efforts and I will be waiting for your further write ups thank you once
    again.

    Here is my blog - http://www.rolexwatchoutletsale.com

    ReplyDelete
  62. I am truly thankful to the owner of this site who has shared this enormous
    paragraph at at this place.

    Look at my homepage コーチ

    ReplyDelete
  63. I don't even know how I ended up here, but I thought this post was good. I don't know who you are but certainly you are
    going to a famous blogger if you are not already ;) Cheers!



    My blog: クロエ

    ReplyDelete
  64. Just want to say your article is as surprising. The clearness in your post is just great and i can assume you're an expert on this subject. Fine with your permission allow me to grab your feed to keep up to date with forthcoming post. Thanks a million and please continue the rewarding work.

    Check out my webpage ... rayban サングラス

    ReplyDelete
  65. It's going to be ending of mine day, but before finish I am reading this fantastic piece of writing to increase my knowledge.

    Stop by my web page; schlientz.com

    ReplyDelete
  66. The other day, while I was at work, my cousin stole my iPad and tested
    to see if it can survive a thirty foot drop, just so she can be
    a youtube sensation. My apple ipad is now broken and
    she has 83 views. I know this is completely off topic
    but I had to share it with someone!

    my web blog :: トリーバーチ

    ReplyDelete
  67. Very good post! We are linking to this great post on our website.
    Keep up the great writing.

    My blog post; ルブタンアウトレット

    ReplyDelete
  68. Its like you read my mind! You appear to know a lot about this, like you wrote the
    book in it or something. I think that you can do with some pics to drive the message home a
    bit, but other than that, this is wonderful blog. A great read.

    I'll definitely be back.

    Stop by my website クリスチャンルブタン

    ReplyDelete
  69. Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point.
    You obviously know what youre talking about, why
    waste your intelligence on just posting videos to your
    weblog when you could be giving us something enlightening to read?


    Feel free to surf to my webpage; クロエ ハンドバッグ

    ReplyDelete
  70. I'm not sure where you're getting your information, but great topic.
    I needs to spend some time learning more or understanding more.

    Thanks for magnificent information I was looking for this
    information for my mission.

    Here is my blog post - ミュウミュウ長財布

    ReplyDelete
  71. Very nice post. I simply stumbled upon your weblog and wished to mention that I have truly enjoyed surfing around your weblog posts.
    After all I will be subscribing on your feed and I'm hoping you write once more very soon!

    Also visit my weblog ... クロエ店舗

    ReplyDelete
  72. When someone writes an piece of writing he/she retains the image of a user in his/her
    brain that how a user can understand it. Thus that's why this paragraph is outstdanding. Thanks!

    My page ... www.airjordansale-shop.com

    ReplyDelete
  73. Good answers in return of this question with genuine arguments and explaining everything regarding that.



    Here is my web blog :: monster ヘッドホン

    ReplyDelete
  74. I'm not sure exactly why but this weblog is loading incredibly slow for me. Is anyone else having this issue or is it a issue on my end? I'll check back later on
    and see if the problem still exists.

    Also visit my web-site darkstargamers.com

    ReplyDelete
  75. الصيانة المنزلية بجدة والمدينة المنورة للقيام بكافة ما يبحث عنه عملائنا من أعمال تمديد الغاز المركزي والسباكة والكهرباء والنجارة والدهانات وفني تركيب الدش بأمهر المتخصصين وأقل التكاليف وسرعة للتواصل مع عملائنا الكرام بجدة والمدينة.

    سباك بالمدينة المنورة
    كهربائي بالمدينة المنورة
    دهان بالمدينة المنورة
    نجار بالمدينة المنورة
    معلم سباك بجدة
    معلم كهربائي بجدة
    معلم دهان بجدة

    ReplyDelete