Skip to main content

entropytree

A decision tree classifier written from scratch (NumPy only) using Shannon entropy and information gain.

pip install sai-entropytree
from sklearn.datasets import load_iris
from entropytree import DecisionTree

iris = load_iris()
tree = DecisionTree(max_depth=2).fit(iris.data, iris.target)
print(tree.score(iris.data, iris.target))
tree.display(iris.feature_names)

Hyperparameters

  • max_depth – size of the tree (default None = grow until pure)
  • min_samples_split – minimum samples needed to split a node
  • min_gain – minimum information gain to accept a split

API

fit(X, y), predict(X), score(X, y), get_depth(), export_text(feature_names), display(feature_names)

Metadata

Release files for sai-entropytree 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sai-entropytree 0.1.0
File Size Uploaded Provenance
sai_entropytree-0.1.0.tar.gz 4.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sai-entropytree 0.1.0
File Interpreter ABI Platform
sai_entropytree-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.4 kB

Release files / sai_entropytree-0.1.0.tar.gz

Download URL sai_entropytree-0.1.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
85134c0ee1a60eecd2c479b785ed9565957da15452fa3c6887340ca0f8568aea
BLAKE2b-256 checksum
How to use checksums
e603ae88de1699b417eae87ba15572bc3b58666f91b32d75e6d55abf409fc36a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / sai_entropytree-0.1.0-py3-none-any.whl

Download URL sai_entropytree-0.1.0-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b6939fc973f614c15ac501610610499a438eae84cadaeed68de3be4d712c3ef
BLAKE2b-256 checksum
How to use checksums
d7a1aeba4b761e78b331cccdc8f8756c26a873a841291d573831137755a2dd50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for sai-entropytree 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page