Giter Site home page Giter Site logo

naveen-gowda-2525 / spam-sms-classification Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 440 KB

It is a NLP project.The business objective was to predict whether the message is a spam or a ham.

Jupyter Notebook 97.35% Python 1.36% HTML 1.29%
nlp-machine-learning naive-bayes-classifier oversampling-technique exploratory-data-analysis datapreprocessing flask heroku

spam-sms-classification's Introduction

# spam-sms-classification
The business objective was to predict whether the message is a spam or a ham.
In the first step EDA was performed to draw insights. The major insights that were drawn from the dataset was.
•	Spam messages wordcount fall in the range of 15-30 words, whereas majority of the Ham messages fall in the range of below 25 words.
• Almost 1/3 of Spam messages contain currency symbols, and currency symbols are rarely used in Ham messages.
• It is evident that most of the Spam messages contain numbers, and majority of the Ham messages donot contain numbers.
The dataset was also checked if it was balanced or not and it was found to be imbalanced so in order to fix this over was implemented to fix it.
The data was cleaned by removing special character and numbers using regular expression, Converting the entire sms into lower case, Tokenizing the sms by words, Removing the stop words, Lemmatizing the words, Joining the lemmatized words, Building a corpus of messages.
After performing data cleaning and  obtaining  corpus of messages a bag of model was created with the help of count vectorizer..A classification model was built by splitting the dataset into test and train dataset.
After trying out with different classification models the naive bayes classifier was selected as the finalized model as it had a good accuracy.
The model was deployed with flask framework and Flask API was created using heroku.

For EDA and Model Building refer - Spam SMS Classication.ipynb
For Deployment refer - app.py
Flask API link - https://spam-sms-classification-api.herokuapp.com/

spam-sms-classification's People

Contributors

naveen-gowda-2525 avatar

Watchers

 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.