Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🛡️ Phishing Email Detection Model

A machine learning project that detects phishing emails and classifies them as either Phishing or Safe using Natural Language Processing (NLP) and Scikit-learn.

📌 Project Overview

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

  • Dataset Size: 12,000 Emails
  • Classes:
    • Phishing
    • Safe
  • Language: English
  • Dataset Source: Custom curated dataset

⚙️ Technologies Used

  • Python
  • Pandas
  • NumPy
  • Matplotlib
  • Scikit-learn
  • Google Colab

🔍 Machine Learning Workflow

  1. Dataset Loading
  2. Data Cleaning
  3. Exploratory Data Analysis (EDA)
  4. TF-IDF Feature Extraction
  5. Train-Test Split
  6. Model Training (Multinomial Naive Bayes)
  7. Model Evaluation
  8. Custom Email Prediction

📈 Results

Accuracy

  • Accuracy: 100.00%

Classification Performance

  • 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.


📸 Screenshots

Dataset Distribution

Dataset Distribution

Model Accuracy

Model Accuracy

Confusion Matrix

Confusion Matrix

Prediction Demo

Prediction Demo


🧪 Example Prediction

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


🚀 Future Improvements

  • Use larger real-world phishing datasets
  • Deploy as a web application
  • Add URL analysis features
  • Integrate deep learning models
  • Real-time email scanning

👨‍💻 Author

Irfan Ahammad

Cybersecurity & AI Enthusiast

About

A machine learning project that classifies emails as phishing or safe using TF-IDF vectorization and the Multinomial Naive Bayes algorithm. Dataset Size: 12,000 emails Accuracy: 100.00%

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages