This project implements a spam text classification system using various Naive Bayes classifiers. It processes and analyzes text messages to determine whether they are spam or legitimate (ham).
- Data preprocessing and feature extraction
- Implementation of multiple Naive Bayes classifiers:
- Gaussian Naive Bayes
- Multinomial Naive Bayes
- Complement Naive Bayes
- Bernoulli Naive Bayes
- Model training and evaluation
- Comparison of model performances
- Prediction functionality for new text inputs
To set up the environment, follow these steps:
- Clone the repository:
git clone https://github.com/yourusername/spam-text-classification.git- Navigate to the project directory:
cd spam-text-classificationTo run the classification system:
- Ensure you have the dataset file '2cls_spam_text_cls.csv' in the project directory.
- Run the Jupyter notebook or Python script:
jupyter notebook Spam_Text_Classification_Naive_Bayes.ipynb- Follow the notebook cells or script execution to:
- Load and preprocess the data
- Train the models
- Evaluate model performance
- Make predictions on new text inputs
The project compares the performance of different Naive Bayes classifiers. Here's a sample of the results:
