Skip to main content

Code style: black CircleCI Main Checked with mypy codecov PyPI Download count Latest PyPI release DOI

treeple

treeple is a scikit-learn compatible API for building state-of-the-art decision trees. These include unsupervised trees, oblique trees, uncertainty trees, quantile trees and causal trees.

Tree-models have withstood the test of time, and are consistently used for modern-day data science and machine learning applications. They especially perform well when there are limited samples for a problem and are flexible learners that can be applied to a wide variety of different settings, such as tabular, images, time-series, genomics, EEG data and more.

Note that this package was originally named scikit-tree but was renamed to treeple after version 0.8.0. version <0.8.0 is still available at https://pypi.org/project/scikit-tree/.

Documentation

See here for the documentation for our dev version: https://docs.neurodata.io/treeple/dev/index.html

Is treeple useful for me?

  1. If you use decision tree models (random forest, extra trees, isolation forests, etc.) in your work, treeple is a good package to try out. We have a variety of better tree models that are not available in scikit-learn, and we are always looking for new tree models to implement. For example, oblique decision trees are in general better than their axis-aligned counterparts.

  2. If you are interested in extending the decision tree API in scikit-learn, treeple is a good package to try out. We have a variety of internal APIs that are not available in scikit-learn, and are able to support new decision tree models easier.

Why oblique trees and why trees beyond those in scikit-learn?

In 2001, Leo Breiman proposed two types of Random Forests. One was known as Forest-RI, which is the axis-aligned traditional random forest. One was known as Forest-RC, which is the random oblique linear combinations random forest. This leveraged random combinations of features to perform splits. MORF builds upon Forest-RC by proposing additional functions to combine features. Other modern tree variants such as Canonical Correlation Forests (CCF), Extended Isolation Forests, Quantile Forests, or unsupervised random forests are also important at solving real-world problems using robust decision tree models.

Installation

Our installation will try to follow scikit-learn installation as close as possible, as we contain Cython code subclassed, or inspired by the scikit-learn tree submodule.

Dependencies

We minimally require:

* Python (>=3.9)
* numpy
* scipy
* scikit-learn

Installation with Pip (https://pypi.org/project/treeple/)

Installing with pip on a conda environment is the recommended route.

pip install treeple

Development

We welcome contributions for modern tree-based algorithms. We use Cython to achieve fast C/C++ speeds, while abiding by a scikit-learn compatible (tested) API. We also will welcome contributions in C/C++ if they improve the extensibility, or runtime performance of the codebase. Our Cython internals are easily extensible because they follow the internal Cython API of scikit-learn as well.

Due to the current state of scikit-learn's internal Cython code for trees, we have to instead leverage a fork of scikit-learn at https://github.com/neurodata/scikit-learn when extending the decision tree model API of scikit-learn. Specifically, we extend the Python and Cython API of the tree submodule in scikit-learn in our submodule, so we can introduce the tree models housed in this package. Thus these extend the functionality of decision-tree based models in a way that is not possible yet in scikit-learn itself. As one example, we introduce an abstract API to allow users to implement their own oblique splits. Our plan in the future is to benchmark these functionalities and introduce them upstream to scikit-learn where applicable and inclusion criterion are met.

References

[1]: Li, Adam, et al. "Manifold Oblique Random Forests: Towards Closing the Gap on Convolutional Deep Networks" SIAM Journal on Mathematics of Data Science, 5(1), 77-96, 2023

Metadata

Release files for treeple 0.10.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for treeple 0.10.3
File Size Uploaded
treeple-0.10.3.tar.gz 9.6 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for treeple 0.10.3
File
treeple-0.10.3-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
treeple-0.10.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
treeple-0.10.3-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
treeple-0.10.3-cp312-cp312-macosx_10_13_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.13+ x86-64 Details
treeple-0.10.3-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
treeple-0.10.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
treeple-0.10.3-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
treeple-0.10.3-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details
treeple-0.10.3-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
treeple-0.10.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
treeple-0.10.3-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
treeple-0.10.3-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details
treeple-0.10.3-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
treeple-0.10.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
treeple-0.10.3-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details
treeple-0.10.3-cp39-cp39-macosx_10_9_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.9+ x86-64 Details

Total release size: 60.9 MB

Release files / treeple-0.10.3.tar.gz

Download URL treeple-0.10.3.tar.gz
Size 9.6 MB
Tags Source
SHA-256 checksum
How to use checksums
3b7e9ab303dd5c9309db2447f7a73b31aeeff7eef6db600121c4684fa72f2558
BLAKE2b-256 checksum
How to use checksums
11ebf430b734b49751cd65de939c5336be67f851e5af4c86c5202bdbfeb021d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.16

Release files / treeple-0.10.3-cp312-cp312-win_amd64.whl

Download URL treeple-0.10.3-cp312-cp312-win_amd64.whl
Size 5.4 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
6990afaed088bfe509202b6edaad10b01d7331fc7ccd93a5eff6c32135edcb8c
BLAKE2b-256 checksum
How to use checksums
8069e7d74a573aeb784a085f334c5409cbc1d19729e8edf170ecb08c70fa68ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.16

Release files / treeple-0.10.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL treeple-0.10.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.8 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
caac7ac972bb4579998ed27cf980dca4083f850d177b8a73d1571b51964885cd
BLAKE2b-256 checksum
How to use checksums
991e40f769745620e946cbb76609148e415a8cec5ec8952293c5f3cc36e4a09a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.16

Release files / treeple-0.10.3-cp312-cp312-macosx_11_0_arm64.whl

Download URL treeple-0.10.3-cp312-cp312-macosx_11_0_arm64.whl
Size 2.2 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b9cc95247a200dd7a0333ae69e78a7e3aecfdbabd57305235a434103be05c7b4
BLAKE2b-256 checksum
How to use checksums
823d8088c694cdc7f9cb3fb37fe0f81c9be75e839057cb4ffbe6224f8b3ce117
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.16

Release files / treeple-0.10.3-cp312-cp312-macosx_10_13_x86_64.whl

Download URL treeple-0.10.3-cp312-cp312-macosx_10_13_x86_64.whl
Size 2.3 MB
Tags CPython 3.12 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
dcb4d143952554496fc28bbaebac8b8b1c05a6326ca1d30de41da256d1c8eb9e
BLAKE2b-256 checksum
How to use checksums
4737aecb4ad5b0c20a7307269146ad8a76a90e814fd69c3f5c39e6a1785c14e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.16

Release files / treeple-0.10.3-cp311-cp311-win_amd64.whl

Download URL treeple-0.10.3-cp311-cp311-win_amd64.whl
Size 5.5 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
31aaeb71f1e2d74eeb24c5b3963b450cdb6cd3596fb81281161ffdca6aeed18e
BLAKE2b-256 checksum
How to use checksums
5508587e4a6771a5380377be9b58fe5136dc0b6bd21a260fe7ff4180796a6510
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.16

Release files / treeple-0.10.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL treeple-0.10.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.9 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
c23d904edf2874c3fff9bfdfb778d0a558cbd587c7e4e201581fad87cb4102be
BLAKE2b-256 checksum
How to use checksums
c247632eba88c2c750f07918a831167347cd908d208c809a4550523e95904aca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.16

Release files / treeple-0.10.3-cp311-cp311-macosx_11_0_arm64.whl

Download URL treeple-0.10.3-cp311-cp311-macosx_11_0_arm64.whl
Size 2.2 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
df0538b587bef257347b9ca6d9bd60fe6526041bdb5219d4247d10a83f2fb3db
BLAKE2b-256 checksum
How to use checksums
10f7fad2c634ab55319c7fe56466c7247f756b046ee1a11a23674db58f1f8754
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.16

Release files / treeple-0.10.3-cp311-cp311-macosx_10_9_x86_64.whl

Download URL treeple-0.10.3-cp311-cp311-macosx_10_9_x86_64.whl
Size 2.3 MB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
71152487cea3b4d49aa29d291e0c0b596f37648c10b2cb74f54379e17a0e0209
BLAKE2b-256 checksum
How to use checksums
5edb3830b2e369bb2c30452ace1f6310bb09b28292047508bb89f7efb9138653
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.16

Release files / treeple-0.10.3-cp310-cp310-win_amd64.whl

Download URL treeple-0.10.3-cp310-cp310-win_amd64.whl
Size 5.5 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
e7cf98a08fcb21222cd5063d2919a82d8b653d8e73bc281423982c873cdd01bd
BLAKE2b-256 checksum
How to use checksums
1b0e619670ca4a1a7c05002ca1f53f39f9beda0bab0e64396321a862b372a05c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.16

Release files / treeple-0.10.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL treeple-0.10.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.9 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
eb875e674e8ccb4def93d6e9ca0d01e78d8677ad670f7f54958f888b767eb265
BLAKE2b-256 checksum
How to use checksums
2f79c285d07fef2c668044f2e23d6089a0aa04ef7273d0fe5fd6b2824a934695
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.16

Release files / treeple-0.10.3-cp310-cp310-macosx_11_0_arm64.whl

Download URL treeple-0.10.3-cp310-cp310-macosx_11_0_arm64.whl
Size 2.2 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
36da98499481226ad356521cc6f337b90857f3a4f481a55eb1c7a5dff6309690
BLAKE2b-256 checksum
How to use checksums
48c9d551fc3d70832d12a0afbec6e122cd638aab9beacc43afa2c77a21e17df9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.16

Release files / treeple-0.10.3-cp310-cp310-macosx_10_9_x86_64.whl

Download URL treeple-0.10.3-cp310-cp310-macosx_10_9_x86_64.whl
Size 2.3 MB
Tags CPython 3.10 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
cec15ae4262bb5ee475f2a8c902757c0efcd846923c8e2df519de2e31c20c92c
BLAKE2b-256 checksum
How to use checksums
fac37527e23d439e8323a8dd42b270fe94af0d0420ff8b8ac7655a86b6f32e31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.16

Release files / treeple-0.10.3-cp39-cp39-win_amd64.whl

Download URL treeple-0.10.3-cp39-cp39-win_amd64.whl
Size 5.5 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
735e4ce1eb11ff51f2f791a0ccf920b5866b758a7b889256e261957a85765186
BLAKE2b-256 checksum
How to use checksums
46793234d4e61d3af2548f8acd77d5e30e6645c7b6c4f9784369d3ed8afc2996
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.16

Release files / treeple-0.10.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL treeple-0.10.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.9 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
fa881516dd84c0112c14b258dd99b357fc8fd3dbb6f4c65960cf6e3f40e57dea
BLAKE2b-256 checksum
How to use checksums
0e060af4e85c02a3644801767b1eabc38874e2dfd87481326800a8ed4a4863e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.16

Release files / treeple-0.10.3-cp39-cp39-macosx_11_0_arm64.whl

Download URL treeple-0.10.3-cp39-cp39-macosx_11_0_arm64.whl
Size 2.2 MB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a13c9591c554b7775120d8a08cf206b6e955be4992eed930615cfdb6749f6107
BLAKE2b-256 checksum
How to use checksums
a0f27408bedc20fa9276c4c16ae20d7c5da76c846844a06310ea37e4f7b4ad19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.16

Release files / treeple-0.10.3-cp39-cp39-macosx_10_9_x86_64.whl

Download URL treeple-0.10.3-cp39-cp39-macosx_10_9_x86_64.whl
Size 2.3 MB
Tags CPython 3.9 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
43a070579896af0cdf47f4aa21830ebbf5d67bb4c052cf31b0c0a045bf0d6198
BLAKE2b-256 checksum
How to use checksums
40cb253369438ec0cc77d7f1c5c1c2c1fc007fb0aefbcfc4bde9b7a2e7bd3c74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.16

Release history Release notifications | RSS feed

This release

0.10.3 This release

17 release files

0.9.1

17 release files

0.9.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page