Classifying URLs as phishing or legitimate using the PhiUSIIL Phishing URL dataset.
- Juno: data preparation, EDA, preprocessing
- Emmanuel: train/test split, baseline and final models, evaluation
PhiUSIIL Phishing URL Dataset, UCI Machine Learning Repository: https://archive.ics.uci.edu/dataset/967/phiusiil+phishing+url+dataset
Run all commands from the repo root. You need Python 3.10 or newer.
git clone https://github.com/EmmanuelUrum/Phishing-Website-Detection.git
cd Phishing-Website-DetectionLinux / macOS:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtWindows (PowerShell):
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -r requirements.txtYour prompt should now start with (.venv). Re-activate it every time you open a new terminal.
nbstripout --installThis keeps notebook outputs out of your commits. Without it, notebooks create huge diffs and merge conflicts.
- Download the PhiUSIIL Phishing URL dataset from the UCI ML Repository.
- Put the CSV here:
data/raw/PhiUSIIL_Phishing_URL_Dataset.csv
Raw data is not committed to git.
python -m src.prepare_dataThis writes data/processed/clean.parquet. If that file is already in the repo, you can skip steps 4 and 5.
jupyter notebookOpen the files in notebooks/ in order, 01 to 04.
from src.split import load_split
from src.evaluate import evaluate
X_train, X_test, y_train, y_test = load_split() # same split for everyone (random_state=42)
# ... train a model ...
metrics = evaluate(model, X_test, y_test, name="random_forest")load_split() reads data/processed/clean.parquet relative to the current folder. Run Python from the repo root, or inside a notebook pass load_split("../data/processed/clean.parquet").
Add each model's metrics to reports/model_comparison.csv.
ModuleNotFoundError: No module named 'src': run from the repo root and usepython -m src.prepare_data, notpython src/prepare_data.py.Missing .../PhiUSIIL_Phishing_URL_Dataset.csv: the CSV is not indata/raw/or has a different name.- Fewer than 235,795 rows loaded, or the label column shows
1.0/0.0: the CSV is incomplete. Download it again. nbstripout: command not found: activate the virtual environment first (step 2).
data/raw/raw PhiUSIIL CSVdata/processed/cleaned dataset (clean.parquet)notebooks/01 EDA, 02 preprocessing, 03 baseline, 04 modelssrc/shared code:prepare_data.py,split.py,evaluate.pyfigures/saved plotsreports/metrics table and written reports