A package to build an optimal binary decision tree classifier.
Project description
Authors | Gaël Aglin, Siegfried Nijssen, Pierre Schaus |
---|
Relevant papers
Description
The PyDL8.5 library provides an implementation of DL8.5 algorithm. Please read the relevant articles referenced below to learn about the additional features. Please cite these papers if you use the current library. The documentation will help you get started with PyDL8.5. It is available here.
This project implements an algorithm for inferring optimal binary decision trees. The core code is written in C++ and this library is a python wrapper extended by additional features. It is scikit-learn compatible and can be used in combination with scikit-learn. As a scikit-learn classifier, it implements the methods "fit" and "predict".
Because the search algorithm and the bounds used in DL8.5 are problem-agnostic, the library can be used to learn any binary decision tree that optimizes an arbitrary objective function. The only requirement is that the criterion function should be additive, i.e. the value of the criterion function for a node should be equal to the sum of the values of the criterion function for its children. The library provides a default misclassification rate criterion function, but it can be easily replaced by any other additive criterion function. As the user-defined criterion function is defined in Python, the learning process will be slower than the default one. Using this feature, the library can be used to learn decision trees for many ML tasks such as regression, classification, clustering, etc. It can solve many problems such as cost-sensitive classification, multi-class classification, false positive/negative minimization, feature selection, unfairness mitigation, complex model explanations, etc. The different criterion functions can be also easily added to the core C++ code for faster learning.
The core C++ code can be used as a standalone tool. It is available in the
core
folder. There is a cmake file
to compile the code. The code is also compatible with Windows, Linux and
MacOS. After compilation, the tool can be used in the console by typing
./dl85 -h
to get the list of available options. There is no dependency
to any other library than the standard C++ library. The only requirement
is a C++ compiler supporting C++17 for Unix systems and C++20 for Windows.
The code is compatible with GCC, Clang and MSVC. The
argument parsing code used originates from the
argpase GitHub project.
The current version of PyDL8.5 is enhanced using some ideas from MurTree paper and listed in CHANGES.txt. The version of the code used in the AAAI paper [DL852020] is v0.0.15.
This tool can be installed in two ways:
- download the source from GitHub and install using the command
pip install .
in the root folder. - install from
PYPI
usingpip
by running the commandpip install pydl8.5
in the console
A C++ compiler supporting C++20 is required to build the code as a Python library if there is no wheel available for your machine.
References
[DL852020] | Aglin, G., Nijssen, S., Schaus, P. | Learning optimal decision trees using caching branch-and-bound search. In AAAI. 2020. |
---|
[PYDL852020] | Aglin, G., Nijssen, S., Schaus, P. | PyDL8.5: a Library for Learning Optimal Decision Trees., In IJCAI. 2020. |
---|
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file pydl8.5-0.1.8.tar.gz
.
File metadata
- Download URL: pydl8.5-0.1.8.tar.gz
- Upload date:
- Size: 67.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdfe7424acdda219933316e634b09132529579e5d2a42941ed8d80cb2add1e9d |
|
MD5 | 877fb8e733ae3664896c4818f7c3aedd |
|
BLAKE2b-256 | e2c6ae516c9ec6d02622ce87502f6bbdfa56d7e4f2df6a4ceb5acf3ff0f507cf |
File details
Details for the file pydl8.5-0.1.8-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: pydl8.5-0.1.8-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 205.5 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66a6c164534641ed197855e697fcb63a51cecf3b1f7e5bb5c3b225b9646ee47f |
|
MD5 | ee4028c9e21c47efc2071c158bf5db1f |
|
BLAKE2b-256 | db0b31516f89edc7c8da6a208a670aaac02233ce55773497b3c4948101229fef |
File details
Details for the file pydl8.5-0.1.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pydl8.5-0.1.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.6 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 214faac5c2053d6c9dbeb395581883a523cb22a1a83f7878fdf930961d2450e6 |
|
MD5 | b91a7e303919c554aee2dd2fcb7b6367 |
|
BLAKE2b-256 | 7c0c36b1afd6900814d0a22d4a08677fb7e96fc93b5b2bec8f774df319e3218f |
File details
Details for the file pydl8.5-0.1.8-cp39-cp39-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: pydl8.5-0.1.8-cp39-cp39-macosx_11_0_x86_64.whl
- Upload date:
- Size: 361.4 kB
- Tags: CPython 3.9, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a0311b749b8997f28dda4bfaa4d286ad9d2bc7845441392b136ae3c4a39bbc1 |
|
MD5 | 60c63724bd54a6c921019a9460ef95d0 |
|
BLAKE2b-256 | ea0a16b213e196c4f95f98763c1583c111c4c07983c9407e3d7d22ef7467bff7 |
File details
Details for the file pydl8.5-0.1.8-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: pydl8.5-0.1.8-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 205.8 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27044e8c3eba993235de347837e0ee75a5ac5323e059f226249d01bd6be67d3f |
|
MD5 | 696961c3d1a326cd4235a4cf69c673d6 |
|
BLAKE2b-256 | 362067ddbc01a300f57de2767a241b78c29406f232e4aa35b208dbcefdc3ddcf |
File details
Details for the file pydl8.5-0.1.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pydl8.5-0.1.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.6 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe7df420fa118b2dfc552fd7b01d26c874c12f8996eb7f37997ef5b7cacd9460 |
|
MD5 | ab12f89f82d99699fce000ccfc4cd2f6 |
|
BLAKE2b-256 | f298bb43fe3b468cf99c31e57417ce5e38e4198dd106d81d3a2af4ab936c76d3 |
File details
Details for the file pydl8.5-0.1.8-cp38-cp38-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: pydl8.5-0.1.8-cp38-cp38-macosx_10_15_x86_64.whl
- Upload date:
- Size: 360.7 kB
- Tags: CPython 3.8, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd79042340df9f25f8fef7a96aee2c051225c3402ba9badf92e70638338d2051 |
|
MD5 | 38031cd629bff23259c0be1aa7910963 |
|
BLAKE2b-256 | b45ac2de32dc662c43412d8a271a37afa4fdb88cf135b41fe5bd83b143ca1918 |