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:

poetry install

Usage

To start main script, execute the following command:

poetry run 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:

poetry run 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.3.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.3-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: decision_tree_dmazilkin-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 8a211c601ff41e9fe34c7cd27c9873e1a43932a4bff2d352dcad0806715e6818
MD5 b56fbeda03b596229d5d2f6ba94cf221
BLAKE2b-256 992603e6a6645b35a9b37cd37a7ef45d42b052a6bc80ef790511c6b2eb959a64

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for decision_tree_dmazilkin-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 01ea38da255dab4f3987c2d790350efa75a060a159c99215dfdb2a53f3c77900
MD5 e6cfc3af903019f8259bf9dc305f099f
BLAKE2b-256 f6ffaa7f1d5ce08bf0ea3943065823339cb8ca282fd4689404bc3cacd5e0fe13

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