GithubHelp home page GithubHelp logo

nishi1612 / email-spam-classification-using-svm Goto Github PK

View Code? Open in Web Editor NEW
32.0 2.0 14.0 474 KB

The uploaded codes help to classify emails into spam and non spam classes by using Support Vector Machine classifier.

Python 100.00%
support-vector-machines email-spam-filter machine-learning-algorithms lemmatization stopwords-removal binary-classifier

email-spam-classification-using-svm's Introduction

Email-Spam-Classification-using-SVM

The codes above help to classify a given mail as a spam or non spam.

Directions of use:

  1. Download the emails dataset from https://tinyurl.com/y93s2kcm and copy all the emails from into a folder named "emails" which should be presented at the same place where these codes are downloaded. The dataset has been formed using emails downloaded from http://www2.aueb.gr/users/ion/data/enron-spam/ website. The data consists of around 10k emails.
  2. First run the code extracting_unique_words_from_all_emails.py which helps to make file wordslist.csv which contains the unique words found in emails which occur more than or equal to 100 times in all emails.
  3. Next run processing_emails_to_find_occurance_of_words.py to find the occurance of each word in the emails dataset and make frequency.csv file which stores the frequency of each important word present in wordlist.csv in every email.
  4. Finally run the svm_implementation.py code to study the predicted results of Support Vector Machine Algorithm on the dataset.

email-spam-classification-using-svm's People

Contributors

nishi1612 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

email-spam-classification-using-svm's Issues

Processing email to find occurence of words

file_reading = open(file_name,"r",encoding='utf-8', errors='ignore')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\Anant\Desktop\Project\Spam Email Detection System/emails/eck-s.tar.gz'

Attribute Error during Implementation

File "C:\Users\User\Documents\FYP 1\SVM Classification\Email-Spam-Classification-using-SVM-master\svm_implementation.py", line 193, in
input_output = df2.as_matrix(columns=None)

AttributeError: 'DataFrame' object has no attribute 'as_matrix'

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.