Skip to main content

This package contains the Decition Tree algrotihm implementation.

Project description

Decision Tree algorithm from scratch

This repository contains Decision Tree implementation from scratch for classification problem.

About

This Decision Tree implementation is based on Leaf-wise algorithm.

  • Supports bins hyperparameter for speeding up the algorithm.
  • Supports Feature Importance calculation, which can help to understand the importance of features.
  • Supports classification heuristics:
    • Entropy and Information Gain,
    • Gini Impurity and Gini Gain,
  • Supports regression heuristics:
    • MSE and MSE Gain.

Dependencies

To install all required dependencies, execute the following command:

pip install requirements.txt

Usage

To start main script, execute the following command:

python main.py [OPTIONS]

Available options

  • -e, --example (required) - type of example to run. Available examples: classification.
  • -c, --config (required) - path to configuration file.

Tests

Test cases are placed in tests/ folder. To run tests use pytest module with the following command:

pytest tests/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

decision_tree_dmazilkin-0.1.2.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

decision_tree_dmazilkin-0.1.2-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file decision_tree_dmazilkin-0.1.2.tar.gz.

File metadata

  • Download URL: decision_tree_dmazilkin-0.1.2.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.12.4 Darwin/24.6.0

File hashes

Hashes for decision_tree_dmazilkin-0.1.2.tar.gz
Algorithm Hash digest
SHA256 55ad4fff4403d3a888e8b4f4ffe2950ef8abcde6a50f71c8a977aa34644fde2e
MD5 7c2424ab8c5450623cd493723491dd52
BLAKE2b-256 49f33809776432fae629eadfdb38d60619c9370643f46449f2b1452ddf35b211

See more details on using hashes here.

File details

Details for the file decision_tree_dmazilkin-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for decision_tree_dmazilkin-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 98c9d5d2b1372edfc75ae2130fe61b726efeb111bc463d484015011ab8082a40
MD5 bca6a546dca76fc087e5bbd7f3ae1f1d
BLAKE2b-256 2f8cde46af3ac412d5748441a125a2032f69b185f6ed251ba55c323daafd618d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page