decision-tree-id3
decision-tree-id3 is a module created to derive decision trees using the ID3 algorithm. It is written to be compatible with Scikit-learn’s API using the guidelines for Scikit-learn-contrib. It is licensed under the 3-clause BSD license.
Important Links
HTML Documentation - https://svaante.github.io/decision-tree-id3
Installation
Dependencies
Python (>= 2.7 or >= 3.3)
NumPy (>= 1.6.1)
Scikit-learn (>= 0.17)
The package by itself comes with a single estimator Id3Estimator. To install the module:
pip install decision-tree-id3
or clone the project using:
git clone https://github.com/svaante/decision-tree-id3.git cd decision-tree-id3 python setup.py install
Usage
If the installation is successful, you should be able to execute the following in Python:
>>> from sklearn.datasets import load_breast_cancer
>>> from id3 import Id3Estimator
>>> from id3 import export_graphviz
>>> bunch = load_breast_cancer()
>>> estimator = Id3Estimator()
>>> estimator.fit(bunch.data, bunch.target)
>>> export_graphviz(estimator.tree_, 'tree.dot', bunch.feature_names)
And to generate a PDF of the decision tree using GraphViz:
dot -Tpdf tree.dot -o tree.pdf
There are a number of different default parameters to control the growth of the tree: - max_depth, the max depth of the tree. - min_samples_split, the minimum number of samples in a split to be considered. - prune, if the tree should be post-pruned to avoid overfitting and cut down on size. - gain_ratio, if the algorithm should use gain ratio when splitting the data. - min_entropy_decrease, the minimum decrease in entropy to consider a split. - is_repeating, repeat the use of features.
For more in depth information see the documentation https://svaante.github.io/decision-tree-id3
Metadata
Release files for decision-tree-id3 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| decision-tree-id3-0.1.2.tar.gz | 12.9 kB | Without provenance | Details for decision-tree-id3-0.1.2.tar.gz |
Release files / decision-tree-id3-0.1.2.tar.gz
| Download URL | decision-tree-id3-0.1.2.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78bf799b6a53c0db1f82d121574ca5067d29ee5c3bc1b98834c4df421f3bdcfc
|
|
BLAKE2b-256 checksum How to use checksums |
53609b51eb3b5096afa1fce2718f56c99f8e183162dae114c56592112ab54329
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for decision-tree-id3 0.1.2
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.