Skip to main content

|Travis Status| |Coveralls Status| |CircleCI Status|

decision-tree-id3-fork

This is a fork of decision-tree-id3. It 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.

Original HTML Documentation can be found on https://svaante.github.io/decision-tree-id3

Installation

Dependencies


-  Python (>= 2.7 or >= 3.3)
-  NumPy (>= 1.14.6)
-  Scikit-learn (>= 1.0)
-  Six (>= 0.9.0)

The package by itself comes with a single estimator Id3Estimator. To install the module:

::

    pip install decision-tree-id3-fork

or clone the project using:

::

    git clone https://github.com/DekwoKybon/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:

.. code:: python

    >>> from sklearn.datasets import load_breast_cancer
        >>> from src.id3 import Id3Estimator
        >>> from src.id3 import export_graphviz

        >>> bunch = load_breast_cancer()
        >>> estimator = Id3Estimator()
        >>> estimator = estimator.fit(bunch.data, bunch.target)
        >>> tree = export_graphviz(estimator.tree_, 'tree.dot', bunch.feature_names)


    And to generate a PDF of the decision tree using GraphViz:
    >>> from id3 import Id3Estimator
    >>> from id3 import export_graphviz

    >>> bunch = load_breast_cancer()
    >>> estimator = Id3Estimator()
    >>> estimator = estimator.fit(bunch.data, bunch.target)
    >>> tree = export_graphviz(estimator.tree_, 'tree.dot', bunch.feature_names)


And to generate a PDF of the decision tree using GraphViz:

.. code:: shell

    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

.. |Travis Status| image:: https://travis-ci.org/svaante/decision-tree-id3.svg?branch=master
   :target: https://travis-ci.org/svaante/decision-tree-id3
.. |Coveralls Status| image:: https://coveralls.io/repos/svaante/decision-tree-id3/badge.svg?branch=master
   :target: https://coveralls.io/r/svaante/decision-tree-id3
.. |CircleCI Status| image:: https://circleci.com/gh/svaante/decision-tree-id3.svg?style=shield&circle-token=:circle-token
   :target: https://circleci.com/gh/svaante/decision-tree-id3/tree/master

Metadata

Release files for decision-tree-id-fork 0.0.15

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

Source distribution (sdist)

Source distribution for decision-tree-id-fork 0.0.15
File Size Uploaded Provenance Actions
decision-tree-id-fork-0.0.15.tar.gz 15.2 kB Without provenance Details for decision-tree-id-fork-0.0.15.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for decision-tree-id-fork 0.0.15
File Interpreter ABI Platform Actions
decision_tree_id_fork-0.0.15-py3-none-any.whl Python 3 none any Details for decision_tree_id_fork-0.0.15-py3-none-any.whl

Total release size: 31.7 kB

Release files / decision-tree-id-fork-0.0.15.tar.gz

Download URL decision-tree-id-fork-0.0.15.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
dbfaf9455f3be2e5bacb287da7638f4d106941a880ca664cec81ed5fe6d57e7d
BLAKE2b-256 checksum
How to use checksums
7876dd0e3d80d0ad27e891e3c01c579c4d936d2fe54094de271c9adbed6843d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.10

Release files / decision_tree_id_fork-0.0.15-py3-none-any.whl

Download URL decision_tree_id_fork-0.0.15-py3-none-any.whl
Size 16.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2dd2a64ba3c6a1b6c6e857f22e932a861b57905f5a05ad3f09e178159fa80135
BLAKE2b-256 checksum
How to use checksums
9547b87810113fa16149d2813506f3f9f740c987d28f38aedd0262232e698f02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.10

Security for decision-tree-id-fork 0.0.15

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.0.15 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