This repository showcases my implementation of a Decision Tree classifier, developed for my university coursework project for first-year. The classifier is built using the ID3 algorithm (Iterative Dichotomiser 3), a fundamental approach in machine learning for supervised classification. Key features include: • Entropy and Information Gain: Calculates entropy and selects the optimal attribute for splitting based on maximum information gain. • ID3 Algorithm Implementation: Recursively builds the decision tree, handling cases like pure subsets, majority class selection, and child node creation. • Custom Tree Structure: Uses a Node class to represent decision tree nodes, supporting attributes, values, and children. • Dataset Handling: Processes categorical datasets in CSV format for training and testing. • Prediction and Evaluation: Implements a prediction function to classify new instances and measure model accuracy on test data.
This project demonstrates my ability to apply theoretical machine learning concepts, including entropy and information theory, to practical algorithm development. It highlights skills in Python programming, data manipulation, and building custom models from scratch.