A lightweight implementation of a Decision Tree built entirely from scratch in Java to learn basic machine learning principles.
This project demonstrates the core principles behind tree-based machine learning algorithms such as ID3, using a simple dataset which can be altered.
Key components:
- Node Class – Represents each node in the tree (feature, threshold, children, or leaf value).
- DecisionTree Class – Handles the training (
fit) and prediction (predict) logic. - Main Class – Provides a simple demonstration using example data.
- Builds a decision tree without external ML libraries
- Uses information gain to find the best splits
- Easily integratable into more advanced models like Random Forests