Analysis updated 2026-05-18
Classify tabular data where you need to explain exactly which training example drove a prediction.
Use as an interpretable alternative to a single decision tree for audits or debugging models.
Benchmark accuracy and traceability tradeoffs against random forest or gradient boosting on your dataset.
| cloudlesson95-arch/hypothesis-tree | 0xallam/my-recipe | 0xhassaan/nn-from-scratch | |
|---|---|---|---|
| Stars | 0 | — | 0 |
| Language | Python | Python | Python |
| Last pushed | — | 2022-11-22 | — |
| Maintenance | — | Dormant | — |
| Setup difficulty | easy | moderate | moderate |
| Complexity | 2/5 | 2/5 | 4/5 |
| Audience | data | general | developer |
Figures from each repo's GitHub metadata at analysis time.
Hypothesis-tree is a small machine learning classifier for tabular data built around one idea: every prediction should be traceable back to a specific training example. Instead of the many trees and averaged weights used by ensemble methods like random forests, this model represents each cluster in its tree as an actual row from the training data, plus a tolerance range for each feature and a class label. When the model makes a prediction, you can trace exactly which cluster it landed in, which training row anchors that cluster, and which features matched within their allowed range. The model starts as a single cluster covering everything and only grows when a group of misclassified samples justifies adding a new one. New clusters are found using a scan that looks for the feature range where errors most outnumber correct predictions, then combines that across features into a box. Several guard rails keep the tree from growing badly: new clusters cannot exceed their parent's bounds, and a cluster that would swallow nearly all of its parent's correctly classified samples gets collapsed instead of kept. The README is upfront that this approach does not beat modern gradient boosting or random forests on raw accuracy, and it backs that claim with benchmark tables across several standard datasets, comparing accuracy, ROC-AUC, and fit time against scikit-learn's decision tree, random forest, and histogram gradient boosting models. Across a wider set of fourteen OpenML datasets, the model lands close to a single decision tree on average accuracy, occasionally beating it, but its confidence scores lose ranking power on imbalanced datasets since they come from per-cluster confidence rather than averaged votes across many trees. The project is small by design: about 900 lines of pure numpy and scikit-learn compatible code, meant to be read rather than treated as a black box. Installation is a standard pip install from the cloned repository, and it requires numpy, scikit-learn, and Python 3.10 or newer.
A small, interpretable tree classifier where every prediction traces back to one training row, with honest benchmarks showing it trades accuracy for traceability.
Mainly Python. The stack also includes Python, NumPy, scikit-learn.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly data.
This repo across BitVibe Labs
Verify against the repo before relying on details.