Skip to main content

Constructing decision trees with genetic algorithm with a scikit-learn inspired API

Project description

forthebadge made-with-python

example workflow name codecov.io MIT license travis status

Genetic Tree

The main objective of the package is to allow creating decision trees that are better in some aspects than trees made by greedy algorithms.

The creation of trees is made by genetic algorithm. In order to achive as fast as possible evolution of trees the most time consuming components are wrtitten in Cython. Also there are implemented mechanisms for using old trees to create new ones without need to classify all observations from beggining (currently in developmnet). There is planned to allow multithreading evolution.

The created trees should have smaller sizes with comparable accuracy to the trees made by greedy algorithms.

Project is currently in development (before first version). The first working official version should be developed in the January 2021 (with documentation and installation by pip).

Installation

To download the latest official release of the package use a pip command below:

pip install genetic-tree

Usage

Example usage:

from genetic_tree import GeneticTree
from sklearn import datasets

iris = datasets.load_iris()       # get iris data

gt = GeneticTree()
gt.fit(iris.data, iris.target)
y_pred = gt.predict(iris.data)    # it is recommended to predict on another subset of data than training

The y_pred contains an array with classes predicted by the GeneticTree

License

The work is a banchelor thesis on Warsaw University of Technology. Commercial use forbidden.

High-level interface of package is inspired by sklearn (https://github.com/scikit-learn/scikit-learn). Especially there are methods like: fit(), predict(), predict_proba(), apply(), set_params(), check_X(), check_input() which are inspired and / or copied from sklearn.

A low-level interface is inspired by sklearn decision_tree. The structure of tree (tree/tree.pyx) and some utils (tree/_utils.pyx) were copied from sklearn tree (https://github.com/scikit-learn/scikit-learn/tree/master/sklearn/tree).

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

genetic_tree-0.1.2-cp38-cp38-manylinux2010_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.12+ x86-64

genetic_tree-0.1.2-cp38-cp38-manylinux2010_i686.whl (2.8 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.12+ i686

genetic_tree-0.1.2-cp38-cp38-manylinux1_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.8

genetic_tree-0.1.2-cp38-cp38-manylinux1_i686.whl (2.8 MB view details)

Uploaded CPython 3.8

genetic_tree-0.1.2-cp38-cp38-macosx_10_9_x86_64.whl (568.8 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

genetic_tree-0.1.2-cp37-cp37m-manylinux2010_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.12+ x86-64

genetic_tree-0.1.2-cp37-cp37m-manylinux2010_i686.whl (2.5 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.12+ i686

genetic_tree-0.1.2-cp37-cp37m-manylinux1_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.7m

genetic_tree-0.1.2-cp37-cp37m-manylinux1_i686.whl (2.5 MB view details)

Uploaded CPython 3.7m

genetic_tree-0.1.2-cp37-cp37m-macosx_10_9_x86_64.whl (560.9 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

genetic_tree-0.1.2-cp36-cp36m-manylinux2010_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.12+ x86-64

genetic_tree-0.1.2-cp36-cp36m-manylinux2010_i686.whl (2.5 MB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.12+ i686

genetic_tree-0.1.2-cp36-cp36m-manylinux1_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.6m

genetic_tree-0.1.2-cp36-cp36m-manylinux1_i686.whl (2.5 MB view details)

Uploaded CPython 3.6m

genetic_tree-0.1.2-cp36-cp36m-macosx_10_9_x86_64.whl (566.8 kB view details)

Uploaded CPython 3.6mmacOS 10.9+ x86-64

File details

Details for the file genetic_tree-0.1.2-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: genetic_tree-0.1.2-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for genetic_tree-0.1.2-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 ea0caf7c1b74eee25561e1065350ee1bb664a936ef8e5af17f3c7b4f88a92644
MD5 40f23909dd15d7a23b73997b3644660e
BLAKE2b-256 c1825b5ed81c1a146e43f716226aef2784415df63d3c58edaf6fceee5b463e7d

See more details on using hashes here.

File details

Details for the file genetic_tree-0.1.2-cp38-cp38-manylinux2010_i686.whl.

File metadata

  • Download URL: genetic_tree-0.1.2-cp38-cp38-manylinux2010_i686.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ i686
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for genetic_tree-0.1.2-cp38-cp38-manylinux2010_i686.whl
Algorithm Hash digest
SHA256 35e201ca2f543b420ca90ec71f3e0763fc27782382091dbc0c49f6aa5af55df6
MD5 f22ea1c9b7a20e20f700d942c7225dbb
BLAKE2b-256 9f54543e858e3c618834d4da67f6010efe0945959f33a31c58efacfd05cb7737

See more details on using hashes here.

File details

Details for the file genetic_tree-0.1.2-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: genetic_tree-0.1.2-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for genetic_tree-0.1.2-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 42adc14be8d4e2de3a9f9bfee8269b31be4a3c49ab7c3ab215085f0b325b70c6
MD5 d548a48a2b8ebb84c10138023d9495e0
BLAKE2b-256 e5962911bf22f9825a444849391eba1192dc41fe5dc580e9f9e984e51db93dd8

See more details on using hashes here.

File details

Details for the file genetic_tree-0.1.2-cp38-cp38-manylinux1_i686.whl.

File metadata

  • Download URL: genetic_tree-0.1.2-cp38-cp38-manylinux1_i686.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for genetic_tree-0.1.2-cp38-cp38-manylinux1_i686.whl
Algorithm Hash digest
SHA256 ad2dbb980b5c6ab30feb832811004a906fd1a9833b0142aa3719810288b8107d
MD5 4b2a0e4b53d85dbef505c654504299fc
BLAKE2b-256 80dd6f72c4da81ab58aa1491de68c902536e1e9d81a4263e98af2d1d853fe11c

See more details on using hashes here.

File details

Details for the file genetic_tree-0.1.2-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: genetic_tree-0.1.2-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 568.8 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.3

File hashes

Hashes for genetic_tree-0.1.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 602bf80ab7b5f975de8b4101330e0640ee53b540fb15d5ce820cbbfe45f68c5e
MD5 d8bcde26932290934c49c49c89c5da92
BLAKE2b-256 2581d41502f713570905abd0d6d7aab27749604e8c0630113dde968ffc899497

See more details on using hashes here.

File details

Details for the file genetic_tree-0.1.2-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: genetic_tree-0.1.2-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for genetic_tree-0.1.2-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 ee5ea67869ce6b3bcf6250b44b129d449cb175f26eb03a3c978395586f34e18c
MD5 76f1a9c36e715cbe6119649804c1c269
BLAKE2b-256 699e07eb3d5fb8931acd2a889e674d2f040fc0c32dde00d9b17c1306461b0c00

See more details on using hashes here.

File details

Details for the file genetic_tree-0.1.2-cp37-cp37m-manylinux2010_i686.whl.

File metadata

  • Download URL: genetic_tree-0.1.2-cp37-cp37m-manylinux2010_i686.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ i686
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for genetic_tree-0.1.2-cp37-cp37m-manylinux2010_i686.whl
Algorithm Hash digest
SHA256 b5b2a19b74b943cff4ef883c48e020a4aead4d1ab68cb3c4733074831e58c630
MD5 33c06b15a7fbec8ce569450a23632cd9
BLAKE2b-256 41735020c8be26c946e1b067d5e6ac49abc89304310cfa3fa0b95ff752705c76

See more details on using hashes here.

File details

Details for the file genetic_tree-0.1.2-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: genetic_tree-0.1.2-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for genetic_tree-0.1.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0cd95fe94849732f009062f770896d8e76e7aa8de0ffa2248154cdbd45042e6b
MD5 b934aee62b255cc362003cedad086409
BLAKE2b-256 ee360746d683eca0355cefbba2d13d1394de63f51f57415bebe9ff62910ee494

See more details on using hashes here.

File details

Details for the file genetic_tree-0.1.2-cp37-cp37m-manylinux1_i686.whl.

File metadata

  • Download URL: genetic_tree-0.1.2-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for genetic_tree-0.1.2-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 ee2c6a1ae76a3c52d6239fe454459e6406ad3376b8b3f947247b7ffbf91bf763
MD5 a01633d69d1fd89b77990a59ec14f1da
BLAKE2b-256 7a26bd24e02c6b5173568e838f614e678dc94b99da24ed9c3ec7b31bcb2fcabd

See more details on using hashes here.

File details

Details for the file genetic_tree-0.1.2-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: genetic_tree-0.1.2-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 560.9 kB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.3

File hashes

Hashes for genetic_tree-0.1.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cd828b16adb45579fa36c9203f7321b381aa52dea4aa0076c8793ac1ada3e96a
MD5 4faf96b72ee344a1ab5e101f9fb3ce10
BLAKE2b-256 9b21c23b46817a3641f6fc4cc51d651d839cec81021cc8794af9c5fb51e1003a

See more details on using hashes here.

File details

Details for the file genetic_tree-0.1.2-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: genetic_tree-0.1.2-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for genetic_tree-0.1.2-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 36387802cf7aaed6b4c2302612067256bcb6baeaaf35383d097507f412ceea12
MD5 d0ea89b9c1239e7a20b24f2c65b929a4
BLAKE2b-256 67f6b5eda0a3d9a8754bc53dba22155715ff4562793f0d27ab9db9684057a0d4

See more details on using hashes here.

File details

Details for the file genetic_tree-0.1.2-cp36-cp36m-manylinux2010_i686.whl.

File metadata

  • Download URL: genetic_tree-0.1.2-cp36-cp36m-manylinux2010_i686.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ i686
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for genetic_tree-0.1.2-cp36-cp36m-manylinux2010_i686.whl
Algorithm Hash digest
SHA256 963cf05a6484080e957f39b573e3b5bb97e46c26f4c70e5c52edf07fa6336f60
MD5 50884a7cb61952d66baf79562a0f4d5d
BLAKE2b-256 37857e199a17af464c2a688e5d0b60f7d77af18706bfe330a426c294196ef7f9

See more details on using hashes here.

File details

Details for the file genetic_tree-0.1.2-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: genetic_tree-0.1.2-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for genetic_tree-0.1.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8f8e46f8a446da8c6d9c1c0692e32dcc303aba02e0098e2a782bd1430624cc7f
MD5 0615505ce5ae972887028825ca755efd
BLAKE2b-256 39a90bcbc7d6e52d8b6c8eda0e15edd10fe86ac0718e5f8083df440d4ee42b85

See more details on using hashes here.

File details

Details for the file genetic_tree-0.1.2-cp36-cp36m-manylinux1_i686.whl.

File metadata

  • Download URL: genetic_tree-0.1.2-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for genetic_tree-0.1.2-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 9f413a9f1904b9201e1e0dfafb2372bcfe2d73de5022109cfcbb086f5a40aa5c
MD5 4729f40ab53083785f3e22037d172676
BLAKE2b-256 34e9cda2f4c8cf6d32cea301c13959bc6f353d86e60128c6cfd1670e3be5a1c6

See more details on using hashes here.

File details

Details for the file genetic_tree-0.1.2-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: genetic_tree-0.1.2-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 566.8 kB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.3

File hashes

Hashes for genetic_tree-0.1.2-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 53e28a45fd3495bee4461732f9894ad804d3f7c97f253d972390e78ae2fc4e17
MD5 d82d56a98f26cc6c8f52115080713f68
BLAKE2b-256 e09dd49033595a8ce656aeba0d3116f9d3e30a44455471fa8ab3d1f51e2e1264

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