Implementation of Decision Tree Classifier from scratch using Python on Dating Dataset and analysis of the various hyper parameters.
The project folder contains 4 python files:
- preprocess.py
- trees.py
- cv_depth.py
- cv_frac.py
############
- preprocess.py
This script contains the preprocessing steps like removing the columns, normalization, label encoding, discretization and split the dataset. It makes use of dating-full.csv as the input. It outputs trainingSet.csv and testSet.csv.
Execution : python3 preprocess.py
- trees.py
This script contains the training and testing of the model for Decision Tree. It takes in two arguments, the training file name, the test file.
Execution : python3 trees.py trainingFileName testFileName
eg: Run command for DT model python3 trees.py trainingSet.csv testSet.csv
- cv_depth.py
This script performs the ten fold validation for the Decision Tree model based on tree depth.
Execution : python3 cv_depth.py
- cv_frac.py
This script performs the ten fold validation for the Decision Tree model with training size as the parameter.
Execution : python3 cv_frac.py