A machine learning project that detects phishing emails and classifies them as either Phishing or Safe using Natural Language Processing (NLP) and Scikit-learn.
Phishing attacks are one of the most common cybersecurity threats. This project uses machine learning techniques to automatically identify potentially malicious emails based on their content.
The model was trained using a custom dataset of phishing and safe emails and achieves high classification performance using TF-IDF vectorization and the Multinomial Naive Bayes algorithm.
- Dataset Size: 12,000 Emails
- Classes:
- Phishing
- Safe
- Language: English
- Dataset Source: Custom curated dataset
- Python
- Pandas
- NumPy
- Matplotlib
- Scikit-learn
- Google Colab
- Dataset Loading
- Data Cleaning
- Exploratory Data Analysis (EDA)
- TF-IDF Feature Extraction
- Train-Test Split
- Model Training (Multinomial Naive Bayes)
- Model Evaluation
- Custom Email Prediction
- Accuracy: 100.00%
- Precision: 1.00
- Recall: 1.00
- F1-Score: 1.00
Note: Results are based on the provided dataset and may vary on real-world email data.
Input:
Congratulations! You won a free iPhone. Click the link below to claim now.
Output:
Phishing
Input:
The meeting has been scheduled for tomorrow at 10 AM
Output:
Safe
- Use larger real-world phishing datasets
- Deploy as a web application
- Add URL analysis features
- Integrate deep learning models
- Real-time email scanning
Irfan Ahammad
Cybersecurity & AI Enthusiast



