GithubHelp home page GithubHelp logo

bigdatastudying / emailspampredictdemostration Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tbrooks007/emailspampredictdemostration

0.0 2.0 0.0 7.28 MB

Email Spam Predictor with Spark

Java 100.00%

emailspampredictdemostration's Introduction

EmailSpamPredictDemostration

Three Part Problem

  1. Gmail Authorization and getting spam and non spam mails from Gmail.
  2. Putting all of them inside HDFS.
  3. Using Spark MLlib's Naive Bayes Model generator to generate spam model and classification of test mail.

Gmail Authorization and getting spam and non spam mails from Gmail

  1. com.david.utilities.gmail.GmailAuthorize.java authorizes you to use your gmail account.
  2. Put your client_secret.json in the src/main/resources folder.
  3. com.david.utilities.gmail.GmailUtility.java gets messages from gmail.

For more info about Gmail Api: https://developers.google.com/gmail/api/?hl=en

Putting all of them inside HDFS

  1. Start your Hadoop single node or cluster.
  2. Put the core-site.xml and hdfs-site.xml in src/main/resources folder.
  3. com.david.utilities.hdfs.HdfsUtility.java puts messages into HDFS.

For more info about Hadoop and how to setup your cluster go to my blog ;) : http://daviddecoding.com/blog/tutorial/installing-hadoop/

Using Spark MLlib's Naive Bayes Model generator to generate spam model and classfication of test mail

  1. com.david.utilities.spark.SparkUtilities.java uses Spark MLlib to generate a Naive Bayes Model.
  2. Then it classifies test mail as Spam or Non-Spam.

For more info about Spark MLlib: http://spark.apache.org/docs/latest/mllib-naive-bayes.html

Other References:

https://www.mapr.com/blog/comparing-kill-mockingbird-its-sequel-with-apache-spark http://www.programcreek.com/java-api-examples/index.php?api=org.apache.spark.mllib.classification.NaiveBayes

emailspampredictdemostration's People

Contributors

daviddecoding avatar

Watchers

James Cloos avatar lipper avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.