asgroi's picture
Create README.md
bfeb9e4 verified
---
language:
- en
license: cc-by-4.0
pretty_name: Phishing Email Curated Cleaned
task_categories:
- tabular-classification
tags:
- cybersecurity
- phishing
- phishing-detection
- email-classification
- text-classification
- benchmark
- tabular
- ai-ready
- nlp
size_categories:
- 100K<n<1M
---
# Phishing Email Curated Cleaned
Phishing Email Curated Cleaned is a cleaned and AI-ready version of the original **Phishing Email Curated Datasets** by Champa, Rabbi and Zibran (2024), an aggregation of 11 heterogeneous email corpora released on Zenodo for benchmarking phishing email detection with machine learning.
The original collection aggregates emails from public corpora spanning 1995–2022 (CEAS-08, Ling-Spam, Enron, Nazario phishing corpus, Nigerian Fraud, SpamAssassin, TREC-05/06/07 plus the extended Nazario_5 and Nigerian_5 splits). The cleaned release preserves the multi-source nature of the data while making it easier to load, more reproducible, and directly usable for supervised classification, NLP-based detection, and cross-source robustness studies.
Compared with the original source asset, this release normalizes the heterogeneous schemas of the 11 source CSVs, applies a label-rescue policy on records with invalid labels, removes duplicate emails, audits constant and non-finite features, and exports a unified labeled dataset in a stable, memory-mapped, ML-ready format. Each sample is represented as a fixed-length numerical vector of 53 features hand-engineered from the raw email text (subject, body, headers, URL signals), while the original textual fields are preserved separately as metadata for audit and traceability.
## Original datasets
This cleaned release is derived from multiple phishing and legitimate email datasets:
- **Original name:** Phishing Email Curated Datasets
- **Original provider:** Champa, Rabbi & Zibran (Idaho State University) — released on Zenodo
- **Original papers:** A. I. Champa, M. F. Rabbi, and M. F. Zibran (2024). *Why phishing emails escape detection: A closer look at the failure points*
A. I. Champa, M. F. Rabbi, and M. F. Zibran (2024). *Curated datasets and feature analysis for phishing email detection with machine learning.*
- **Original DOI:** https://doi.org/10.5281/zenodo.8339691
- **Original project/repository:** https://zenodo.org/records/8339691
Please cite the original datasets and related publications when using this cleaned release in research.
## Files
| File | Description |
|---|---|
| `email_clean.npz` | Index file with row/feature counts and file references |
| `email_clean_X.npy` | Feature matrix (`float32`), NumPy `.npy` array, shape `(181907, 53)` |
| `email_clean_y.npy` | Label vector (`int32`), `0 = legitimate`, `1 = phishing` |
| `email_clean_metadata.parquet` | Per-sample metadata including source dataset fields and quality flags |
| `canonical_manifest_final.json` | Versioned manifest with checksums and artifact references |
| `email_curated_cleaned_dataset.ipynb` | Exploration and usage notebook |
## What’s in the dataset?
This cleaned release contains a fully labeled phishing email classification dataset built from multiple curated sources.
### Labeled split
- **181,907 labeled samples**
- **53 numerical features**
- feature dtype: `float32`
- label dtype: `int32`
- labels:
- `0` = legitimate
- `1` = phishing
The dataset combines phishing and legitimate emails originating from multiple heterogeneous corpora.
### Feature representation
Samples are represented as **fixed-length numerical feature vectors** derived from structured email-related characteristics.
The feature space includes information related to:
- email structure
- sender-related properties
- subject-related properties
- URL indicators
- attachment-related characteristics
- textual and statistical indicators
- phishing-related heuristics
The original source datasets may also contain raw email text or additional metadata fields. These are preserved in the metadata parquet file when available but excluded from the numerical ML feature matrix.
### Multi-source harmonization
One of the main goals of this cleaned release is the harmonization of heterogeneous phishing email corpora into a unified and reproducible tabular benchmark.
The pipeline standardizes:
- labels
- metadata structure
- feature schema
- source attribution
- duplicate handling
across all original datasets.
## Cleaning summary
This release is the output of a quality-control and harmonization pipeline applied to the original phishing email corpora.
Main processing steps:
1. **Duplicate removal** using canonical email identifiers
2. **Metadata standardization**
3. **Cross-source schema harmonization**
4. **Feature integrity validation**
5. **Missing-value and non-finite auditing**
6. **Manifest generation** for reproducibility and integrity checks
Summary of the main changes:
- **35,297 duplicate samples removed**
- **0 constant features dropped**
- **0 rows removed due to NaN/Inf/non-finite values**
- final dataset shape: **181,907 × 53**
No label conflicts were found during duplicate analysis.
## File structure
```text
Email_Curated_cleaned/
├── email_clean.npz
├── email_clean_X.npy
├── email_clean_y.npy
├── email_clean_metadata.parquet
└── canonical_manifest_final.json
```
The `.npz` index stores `_rows` and `_features` for reliable loading.
The feature matrix is stored as a NumPy `.npy` array and can be loaded directly with `np.load(...)`.
## Requirements
To run the quickstart examples, install the minimum required dependencies:
```bash
pip install numpy pandas pyarrow
```
For notebook-based exploration and basic visualization, you may also install:
```bash
pip install jupyter matplotlib seaborn scikit-learn
```
## Quickstart
This example loads the labeled Phishing Email Curated Cleaned dataset and checks that features, labels, and metadata are consistent and ready for supervised use.
```python
import numpy as np
import pandas as pd
idx = np.load("email_clean.npz", allow_pickle=True)
n_rows = int(idx["_rows"])
n_features = int(idx["_features"])
X = np.load("email_clean_X.npy")
y = np.load("email_clean_y.npy")
meta = pd.read_parquet("email_clean_metadata.parquet")
print(
f"Dataset: {X.shape[0]} samples, {X.shape[1]} features | "
f"labels: {y.shape[0]} | metadata columns: {meta.shape[1]}"
)
assert X.shape == (n_rows, n_features)
assert X.shape[0] == len(y) == len(meta)
assert set(np.unique(y)) == {0, 1}
print("Unique labels:", np.unique(y))
print("Metadata columns:", meta.columns.tolist())
print("All checks passed.")
```
## Notebook
The repository also includes an exploration notebook in `.ipynb` format, designed to provide additional context on the cleaned dataset, its structure, and its main analytical use cases.
The notebook can be used to:
- inspect the labeled split, its 53 features and its 11-source provenance
- explore feature distributions, sparsity profile and per-class statistics
- validate dataset consistency end-to-end
- review two example use cases: feature importance with Random Forest and full model evaluation (precision/recall, confusion matrix, ROC curve)
To open it locally, run:
```bash
jupyter notebook email_curated_cleaned_dataset.ipynb
```
or, if you use JupyterLab:
```bash
jupyter lab email_curated_cleaned_dataset.ipynb
```
Make sure to open the notebook from the dataset root directory so that relative file paths resolve correctly.
## Typical use cases
Phishing Email Curated Cleaned supports:
- binary phishing email detection
- benchmarking of tabular ML pipelines
- feature importance and ablation analysis on lexical, structural and URL-based signals
- cross-source generalisation studies (train on N corpora, test on a held-out source)
- exploratory data analysis on email content and metadata
- failure-point analysis: studying why some phishing emails escape ML detection
The accompanying notebook includes dataset loading, exploratory analysis, and example use cases focused on phishing email classification and feature evaluation.
## Notes and limitations
This is a structured phishing email dataset focused on engineered numerical features.
The cleaned release does not distribute raw malicious email attachments or executable payloads.
The dataset is derived from heterogeneous public corpora and may reflect source-specific collection biases.
The dataset is not intended for temporal phishing analysis.
Results obtained on this benchmark should not be over-generalized to all phishing ecosystems without additional validation.
The dataset is intended for defensive research, benchmarking, and education.
## License
This cleaned release is derived from the original dataset. The original data files are associated with the CC BY 4.0 License. Please verify that your downstream redistribution and reuse remain aligned with the original source dataset.
## References
If you use this dataset, please cite the original Phishing Email Curated dataset release:
@inproceedings{champa2024phishing,
title={Why Phishing Emails Escape Detection: A Closer Look at the Failure Points},
author={Champa, Arifa I and Rabbi, Fazle and Zibran, Minhaz F},
booktitle={2024 12th International Symposium on Digital Forensics and Security (ISDFS)},
pages={1--6},
year={2024},
organization={IEEE}
}
@inproceedings{champa2024curated,
title={Curated Datasets and Feature Analysis for Phishing Email Detection with Machine Learning},
author={Champa, Arifa I and Rabbi, Md Fazle and Zibran, Minhaz F},
booktitle={3rd IEEE International Conference on Computing and Machine Intelligence (ICMI)},
pages = {1--7},
year={2024}
}
## APA:
Arifa Islam, C. (2023). Phishing Email Curated Datasets [Data set]. Zenodo. https://doi.org/10.5281/zenodo.8339691
## Contacts
Shared by: ACN