A collection of very decisive decision trees
Project description
Decisive Tree
A from-scratch Python implementation of the ID3, C4.5, and CART decision tree algorithms, created for educational purposes.
This project provides a clear and understandable look into the core mechanics of these foundational machine learning models, from the splitting criteria to the recursive tree-building process. It also includes a suite of from-scratch utilities for data preprocessing and model evaluation.
Key Features
- ID3 Algorithm: Implements the classic algorithm using Information Gain, perfect for datasets with nominal features.
- C4.5 Algorithm: An extension of ID3 using Gain Ratio to handle both nominal (multi-way split) and continuous features (binary split).
- CART Algorithm: Implements Classification and Regression Trees using Gini Impurity (for classification) and Variance Reduction (for regression) with strictly binary splits for all feature types.
- Utilities: Includes custom, understandable implementations of:
- Data splitting and preprocessing (
split_data,one_hot_encode,ordinal_encode). - Model evaluation (
get_confusion_matrix,calculate_metrics,plot_confusion_matrix).
- Data splitting and preprocessing (
- Tree Visualization: All models include a
.plot()method for a simple console-based visualization of the resulting tree structure.
Installation
You can install decisive-tree directly from PyPI:
pip install decisive-tree
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file decisive_tree-0.1.1.tar.gz.
File metadata
- Download URL: decisive_tree-0.1.1.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a80a91715b8996925a71c0249a6dd4bd3b68c0a18f79509fc77d4e6f44298cb7
|
|
| MD5 |
bbb37a71a94df4948a0d91af466f6057
|
|
| BLAKE2b-256 |
dfffc0e170d6909167f5f5a1b8a94bd6c886ca9fa87fc4592527bc4dcdcf9396
|
Provenance
The following attestation bundles were made for decisive_tree-0.1.1.tar.gz:
Publisher:
publish.yml on mateushmd/decisive-tree
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
decisive_tree-0.1.1.tar.gz -
Subject digest:
a80a91715b8996925a71c0249a6dd4bd3b68c0a18f79509fc77d4e6f44298cb7 - Sigstore transparency entry: 567167786
- Sigstore integration time:
-
Permalink:
mateushmd/decisive-tree@deebb46fe6bbde06cd29f7557735c45c6ebb4db9 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/mateushmd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@deebb46fe6bbde06cd29f7557735c45c6ebb4db9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file decisive_tree-0.1.1-py3-none-any.whl.
File metadata
- Download URL: decisive_tree-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
519c87d9aa7280f13226d79f39958d4bf41727f6a1acf4c33563a9e399ed9936
|
|
| MD5 |
12356eb0f2663d89e71fd5ad3ea50d91
|
|
| BLAKE2b-256 |
a841dc5e35413ced175c61b5e28d6cdc31341b0069cdd969aa2aed4f9efd572b
|
Provenance
The following attestation bundles were made for decisive_tree-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on mateushmd/decisive-tree
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
decisive_tree-0.1.1-py3-none-any.whl -
Subject digest:
519c87d9aa7280f13226d79f39958d4bf41727f6a1acf4c33563a9e399ed9936 - Sigstore transparency entry: 567167791
- Sigstore integration time:
-
Permalink:
mateushmd/decisive-tree@deebb46fe6bbde06cd29f7557735c45c6ebb4db9 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/mateushmd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@deebb46fe6bbde06cd29f7557735c45c6ebb4db9 -
Trigger Event:
release
-
Statement type: