🤖ML Model

SMS Spam Detection Model

A complete machine learning project focused on building and optimizing an SMS spam detector. The process begins with loading and cleaning text data, followed by feature extraction using TF-IDF vectorization. Several models are trained, including Multinomial Naive Bayes and Logistic Regression. Advanced techniques are employed to boost performance, such as hyperparameter tuning with GridSearchCV, handling class imbalance with SMOTE, and feature engineering by incorporating message length. The final trained model and vectorizer are saved using joblib and deployed as a user-friendly, interactive web application with Streamlit.

📅6/18/2025
⏱️
👤Data Scientist
completed
Project screenshot 1

Model Performance

98.6%
Accuracy
100%
Precision
89.3%
Recall
94.3%
F1 Score

Technologies Used

Pythonscikit-learnpandasnumpymatplotlibseabornjoblibstreamlitimblearn

Features

Text data cleaning using regular expressions
Feature extraction from text using TF-IDF Vectorization
Model training with Multinomial Naive Bayes and Logistic Regression
Hyperparameter tuning using GridSearchCV to find the optimal alpha
Balancing the dataset with SMOTE to handle class imbalance
Feature engineering by adding message length as a predictive feature
Model evaluation with accuracy, precision, recall, and F1-score metrics
Deployment of the final model as an interactive Streamlit web application