# Model description
This is a Decision tree model trained on a phishing URL detection dataset. The dataset contains features from URLs and their webpage content. The model is trained to classify whether a website is legitimate (label 1) or an act of phishing (label 0).
## Intended uses & limitations
This model is made for educational purposes and is not ready to be used in production.
## Training Procedure
With this dataset, I will be using a decision tree to predict whether certain websites are legitimate or an act of phishing. This is because Naive Bayes assumes feature independence, which is not true for this case. Decision trees split data based on actual patterns, which is useful for phishing detection.
Overall, the data does not meet the criteria for Naive Bayes because the features are not independent.
Using decision trees for this case is crucial because it offers clear interpretability of the classification logic. It will be able to differentiate legitimate vs illegitimate websites.
## How to use the model
In your notebook, paste the following code:
-------------------------------------------------------------
from huggingface_hub import hf_hub_download
hf_hub_download(repo_id="CSC310-fall25/training_classification_phishing", filename="model.pkl",local_dir='.')
dt_loaded = sio.load('model.pkl')
-------------------------------------------------------------
This will load the model.
You can download the appropriate test data by pasting this code:
-------------------------------------------------------------
hf_hub_download(repo_id="CSC310-fall25/training_classification_phishing", filename="phishing_test.csv",local_dir='.')
phishing_test = pd.read_csv('phishing_test.csv')
-------------------------------------------------------------
## Dataset Details
Dataset Characteristics: Tabular
Associated Tasks: Classification
Number of Features: 54
Number of Instances: 235795
Feature Type: Real, Categorical, Integer
### Hyperparameters
Click to expand
| Hyperparameter | Value |
| :----------------------: | :----: |
| ccp_alpha | 0.0 |
| class_weight | None |
| criterion | gini |
| max_depth | 2 |
| max_features | None |
| max_leaf_nodes | None |
| min_impurity_decrease | 0.0 |
| min_samples_leaf | 0.2 |
| min_samples_split | 0.2 |
| min_weight_fraction_leaf | 0.0 |
| monotonic_cst | None |
| random_state | 67 |
| splitter | random |
DecisionTreeClassifier(max_depth=2, min_samples_leaf=0.2, min_samples_split=0.2,random_state=67, splitter='random')In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
DecisionTreeClassifier(max_depth=2, min_samples_leaf=0.2, min_samples_split=0.2,random_state=67, splitter='random')