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.1.tar.gz (4.2 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.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: decision_tree_dmazilkin-0.1.1.tar.gz
  • Upload date:
  • Size: 4.2 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.1.tar.gz
Algorithm Hash digest
SHA256 6d096bf2c08411fc45fc53bf95ad6bcd513c227b42dd642f0194208a05f71054
MD5 273fa5a7c7d51f5c729da32a8243e25c
BLAKE2b-256 7be781e481248a4a2acfe79841ff4f0ef27998b67be3a2a7f8b21fca24fe4255

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for decision_tree_dmazilkin-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4ae5b059c1fbcb5755683ee8935b38803d6733648f51b9b23ff1b0cac1f4c78a
MD5 44f49537dfcc0a14806570209b0c29d2
BLAKE2b-256 f6b98671d75efe48aa4ed77398f75294d33914f94a5865dd08d6b003e623267a

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