Skip to main content

Deep Forest (DF) 21

github readthedocs codecov python pypi style

DF21 is an implementation of Deep Forest 2021.2.1. It is designed to have the following advantages:

  • Powerful: Better accuracy than existing tree-based ensemble methods.

  • Easy to Use: Less efforts on tunning parameters.

  • Efficient: Fast training speed and high efficiency.

  • Scalable: Capable of handling large-scale data.

DF21 offers an effective & powerful option to the tree-based machine learning algorithms such as Random Forest or GBDT.

For a quick start, please refer to How to Get Started. For a detailed guidance on parameter tunning, please refer to Parameters Tunning.

DF21 is optimized for what a tree-based ensemble excels at (i.e., tabular data), if you want to use the multi-grained scanning part to better handle structured data like images, please refer to the origin implementation for details.

Installation

DF21 can be installed using pip via PyPI which is the package installer for Python. You can use pip to install packages from the Python Package Index and other indexes. Refer this for the documentation of pip. Use this command to download DF21 :

pip install deep-forest

Quickstart

Classification

from sklearn.datasets import load_digits
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score

from deepforest import CascadeForestClassifier

X, y = load_digits(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=1)
model = CascadeForestClassifier(random_state=1)
model.fit(X_train, y_train)
y_pred = model.predict(X_test)
acc = accuracy_score(y_test, y_pred) * 100
print("\nTesting Accuracy: {:.3f} %".format(acc))
>>> Testing Accuracy: 98.667 %

Regression

from sklearn.datasets import load_boston
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error

from deepforest import CascadeForestRegressor

X, y = load_boston(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=1)
model = CascadeForestRegressor(random_state=1)
model.fit(X_train, y_train)
y_pred = model.predict(X_test)
mse = mean_squared_error(y_test, y_pred)
print("\nTesting MSE: {:.3f}".format(mse))
>>> Testing MSE: 8.068

Resources

Reference

@article{zhou2019deep,
    title={Deep forest},
    author={Zhi-Hua Zhou and Ji Feng},
    journal={National Science Review},
    volume={6},
    number={1},
    pages={74--86},
    year={2019}}

@inproceedings{zhou2017deep,
    title = {{Deep Forest:} Towards an alternative to deep neural networks},
    author = {Zhi-Hua Zhou and Ji Feng},
    booktitle = {IJCAI},
    pages = {3553--3559},
    year = {2017}}

Thanks to all our contributors

contributors

Metadata

Release files for deep-forest 0.1.7

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

Built distributions (wheels)

Table of built distributions (wheels) for deep-forest 0.1.7
File
deep_forest-0.1.7-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
deep_forest-0.1.7-cp39-cp39-manylinux2014_aarch64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ ARM64 Details
deep_forest-0.1.7-cp39-cp39-manylinux2010_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.12+ x86-64 Details
deep_forest-0.1.7-cp39-cp39-manylinux1_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.5+ x86-64 Details
deep_forest-0.1.7-cp39-cp39-macosx_10_9_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.9+ x86-64 Details
deep_forest-0.1.7-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
deep_forest-0.1.7-cp38-cp38-manylinux2014_aarch64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ ARM64 Details
deep_forest-0.1.7-cp38-cp38-manylinux2010_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.12+ x86-64 Details
deep_forest-0.1.7-cp38-cp38-manylinux1_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.5+ x86-64 Details
deep_forest-0.1.7-cp38-cp38-macosx_10_9_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.9+ x86-64 Details
deep_forest-0.1.7-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details
deep_forest-0.1.7-cp37-cp37m-manylinux2014_aarch64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ ARM64 Details
deep_forest-0.1.7-cp37-cp37m-manylinux2010_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64 Details
deep_forest-0.1.7-cp37-cp37m-manylinux1_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 Details
deep_forest-0.1.7-cp37-cp37m-macosx_10_9_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64 Details

Total release size: 27.5 MB

Release files / deep_forest-0.1.7-cp39-cp39-win_amd64.whl

Download URL deep_forest-0.1.7-cp39-cp39-win_amd64.whl
Size 555.1 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
9c5151d90caf47d025245dff8828e8355ed325c2644e2d1867c1d91984d4093c
BLAKE2b-256 checksum
How to use checksums
5a680380023962999809b3805baa441899f68b57cc8c46c809aac402707a90bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release files / deep_forest-0.1.7-cp39-cp39-manylinux2014_aarch64.whl

Download URL deep_forest-0.1.7-cp39-cp39-manylinux2014_aarch64.whl
Size 2.8 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
69d811d38d6bac425ed3710bf693b1cdf0819d2e513706ecf3f7ca7ca0452faa
BLAKE2b-256 checksum
How to use checksums
5c8babf03aa7dfc3fac933ae18b9e53e85a0dec513a7ceb5e586aacc2762f1e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release files / deep_forest-0.1.7-cp39-cp39-manylinux2010_x86_64.whl

Download URL deep_forest-0.1.7-cp39-cp39-manylinux2010_x86_64.whl
Size 2.6 MB
Tags CPython 3.9 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
0f3ece8e71a211d4dd6fcd0e5a8b449406ee2ace29be7fbda1963a59cfd80127
BLAKE2b-256 checksum
How to use checksums
0cab21af75905807fe0fda589f3616cae6e977ae928cf2e32c02ecb5cfa24541
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release files / deep_forest-0.1.7-cp39-cp39-manylinux1_x86_64.whl

Download URL deep_forest-0.1.7-cp39-cp39-manylinux1_x86_64.whl
Size 2.6 MB
Tags CPython 3.9 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
b049c3c849e315d6212ef0428b7e80e3bc906b2fc91d84694917ccacfe74c632
BLAKE2b-256 checksum
How to use checksums
25cfe462c7c6650dc930f28e8ae13d38629ec20ca59bbf38a273f0f4c9c36230
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release files / deep_forest-0.1.7-cp39-cp39-macosx_10_9_x86_64.whl

Download URL deep_forest-0.1.7-cp39-cp39-macosx_10_9_x86_64.whl
Size 568.7 kB
Tags CPython 3.9 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
26fd97a04632bbc6cf264048dc3cc31a3d056d28e9aa1359a89e633abf189475
BLAKE2b-256 checksum
How to use checksums
d71d68fb2ce974d287db78e8a9d1efe17e0bac69314e1faa3611c5d05884d7f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release files / deep_forest-0.1.7-cp38-cp38-win_amd64.whl

Download URL deep_forest-0.1.7-cp38-cp38-win_amd64.whl
Size 556.9 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
577423bd77ea170db4958f6616de7ed6573a09d5228019b1f6ee5e1910fab31b
BLAKE2b-256 checksum
How to use checksums
1a1f571d53d29cf9541d74af2cb0b58557114a7724b662d934bc5af109bd4c93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release files / deep_forest-0.1.7-cp38-cp38-manylinux2014_aarch64.whl

Download URL deep_forest-0.1.7-cp38-cp38-manylinux2014_aarch64.whl
Size 2.9 MB
Tags CPython 3.8 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
35bcccfc5554d36c54e3ccf9a98bae24abb10d757eeed8cf271fb55599a9eea8
BLAKE2b-256 checksum
How to use checksums
889b66bf7c99d731eb13a9dd4575109a5419b7305f5a76ad2f11fcf4ec38bc31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release files / deep_forest-0.1.7-cp38-cp38-manylinux2010_x86_64.whl

Download URL deep_forest-0.1.7-cp38-cp38-manylinux2010_x86_64.whl
Size 2.8 MB
Tags CPython 3.8 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
658089d112f79a3f31c5116d76456cbf8709c6108862800d5232c5918f8d7f20
BLAKE2b-256 checksum
How to use checksums
475e08690c688b6fd6201135bd59ee4306682fd9728eca488ac538ccd613ec9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release files / deep_forest-0.1.7-cp38-cp38-manylinux1_x86_64.whl

Download URL deep_forest-0.1.7-cp38-cp38-manylinux1_x86_64.whl
Size 2.8 MB
Tags CPython 3.8 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
fd7c21ff48ef4645dd46011db92cf64455fec6fa241a09919db682a4171967e4
BLAKE2b-256 checksum
How to use checksums
e46bd280c906edb4fd27ac354270fc243fc9d01520c6a45c7429ad05d6207000
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release files / deep_forest-0.1.7-cp38-cp38-macosx_10_9_x86_64.whl

Download URL deep_forest-0.1.7-cp38-cp38-macosx_10_9_x86_64.whl
Size 557.8 kB
Tags CPython 3.8 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
2d84efe56e06f282937b002f4e84b5918e86ea8c849a6f9cf07bbb9da2e16fc1
BLAKE2b-256 checksum
How to use checksums
e9eefd8efed15837fb7496c21a928062627bdc15681c53fc81672b7a34c52ae3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release files / deep_forest-0.1.7-cp37-cp37m-win_amd64.whl

Download URL deep_forest-0.1.7-cp37-cp37m-win_amd64.whl
Size 548.1 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
47f306d5a2fc91342d47299db55b949cf381089457b466238d91701d8cc37f88
BLAKE2b-256 checksum
How to use checksums
67b4cf8a4753e2afacecfbed369cf482d3b046375a8ff66196ba208d45ca7c69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release files / deep_forest-0.1.7-cp37-cp37m-manylinux2014_aarch64.whl

Download URL deep_forest-0.1.7-cp37-cp37m-manylinux2014_aarch64.whl
Size 2.7 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
0cfce858448a075521d81fd740f84de2c0ae66c78a67f2d57be8fae8d78fd4a3
BLAKE2b-256 checksum
How to use checksums
588616b48a2d47538cfc144521efd4b878840891937f97b6334e5d4ba8b17168
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release files / deep_forest-0.1.7-cp37-cp37m-manylinux2010_x86_64.whl

Download URL deep_forest-0.1.7-cp37-cp37m-manylinux2010_x86_64.whl
Size 2.5 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
8cc1d184afeee71c7d0197143a72ee390be18b6c2456612191b00874b6900f50
BLAKE2b-256 checksum
How to use checksums
21c9542dddcbf407e3f793caed8c6078985bbbf82395b33221971d0ee7666b5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release files / deep_forest-0.1.7-cp37-cp37m-manylinux1_x86_64.whl

Download URL deep_forest-0.1.7-cp37-cp37m-manylinux1_x86_64.whl
Size 2.5 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
1442ae6790f7557020f1d3dcd230661faae2f3ad89ac11c2c4119f98df387175
BLAKE2b-256 checksum
How to use checksums
64ee232d438464b6e330675e5d2a7db3ecd46d6fdc70752ddffeda838cffd77e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release files / deep_forest-0.1.7-cp37-cp37m-macosx_10_9_x86_64.whl

Download URL deep_forest-0.1.7-cp37-cp37m-macosx_10_9_x86_64.whl
Size 560.7 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
1b157d5d1acf023b341e869b4a3d45ebb1b8591fd8f175b6946637009e108c44
BLAKE2b-256 checksum
How to use checksums
a60132f6da43bb722d54938865da2336bcbf3208728f9ba92f3913169fec6002
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.1.7 This release

15 release files

0.1.6

15 release files

0.1.5

20 release files

0.1.4

15 release files

0.1.3

12 release files

0.1.2

12 release files

0.1.1

9 release files

0.1.0

9 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