Giter VIP home page Giter VIP logo

spam-classifier's Introduction

Spam Classifier

This is a SMS/Email Spam classifier that identifies if a given text message is a potential advert, fraud or scam and seperate it from actual text messages.

Dataset Used:

The dataset used in this project was fetched from kaggle named:

SMS Spam Collection Dataset

Link to dataset: https://www.kaggle.com/datasets/uciml/sms-spam-collection-dataset

About

Identification and Description of problem

Big Tech Giants like Google put a spam classifier in their email system to detect whether a recieved email is an important one or a spam by some other company targeted for advertisement.
Whenever a user logs into another site or uses a product using the same account for email then the company pushes promotion with or without consent.
In order to deal with this massive problem, classification and detection is very crucial in order to provide a very good experience to the user and avoid any hassle.

Process

We have to breakdown the MLA into following steps:

  1. Data Cleaning
  2. EDA
  3. Text Preprocessing
  4. Model Building
  5. Evaluation
  6. Improvement
  7. Deployment

Libraries Needed:

pip install nltk
pip install pandas
pip install sklearn
pip install numpy
pip install streamlit
pip install collection

Conclusion

After every inspection, we can see that Multinomial Naive Bayes is the best performing algorithm with

accuracy metrics of:
---------------------------
Accuracy Score: 0.9691
Conusion Matrix:
[[888 0]
[ 32 114]]
Precision Score: 1.0

with hyperparameter of

max_features of tfidf set to 3000
default parameters of MNB

To run the website

Run the main.ipynb file from top to bottom
enter the following command in the terminal

streamlit run app.py

Accuracy has been precisely calculated over different scenarios. However, we can further fine tune the model using other ensemble learning methods like VotingClasifier

Note that this is merely a prototype and is not optimized

spam-classifier's People

Contributors

cephal0 avatar

Watchers

Kostas Georgiou avatar  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.