This repository features a highly accurate spam detection model trained using a Support Vector Machine (SVM). It includes a pre-trained model file and an IPython Notebook for execution.
- This SVM model achieves high accuracy in detecting spam emails.
- It is trained on a well-processed dataset to optimize performance.
- The model effectively reduces false positives and enhances precision in spam classification.
This model is designed to classify emails as spam or not spam using an SVM classifier.
import joblib
tfidf = joblib.load('tfidf_vectorizer.pkl')
classifier = joblib.load('spam.model')
input_text = ["Congratulations! You won a prize."]
input_tfidf = tfidf.transform(input_text)
prediction = classifier.predict(input_tfidf)
print(prediction)
The provided Jupyter Notebook (spam_detection.ipynb)
contains step-by-step instructions to test the model. Follow these steps to execute it:
jupyter notebook spam_detection.ipynb