Skip to main content

Deep Forest

Project description

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

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

deep_forest-0.1.7-cp39-cp39-win_amd64.whl (555.1 kB view details)

Uploaded CPython 3.9 Windows x86-64

deep_forest-0.1.7-cp39-cp39-manylinux2010_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

deep_forest-0.1.7-cp39-cp39-manylinux1_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.9

deep_forest-0.1.7-cp39-cp39-macosx_10_9_x86_64.whl (568.7 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

deep_forest-0.1.7-cp38-cp38-win_amd64.whl (556.9 kB view details)

Uploaded CPython 3.8 Windows x86-64

deep_forest-0.1.7-cp38-cp38-manylinux2010_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

deep_forest-0.1.7-cp38-cp38-manylinux1_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.8

deep_forest-0.1.7-cp38-cp38-macosx_10_9_x86_64.whl (557.8 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

deep_forest-0.1.7-cp37-cp37m-win_amd64.whl (548.1 kB view details)

Uploaded CPython 3.7m Windows x86-64

deep_forest-0.1.7-cp37-cp37m-manylinux2010_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

deep_forest-0.1.7-cp37-cp37m-manylinux1_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.7m

deep_forest-0.1.7-cp37-cp37m-macosx_10_9_x86_64.whl (560.7 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

Details for the file deep_forest-0.1.7-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for deep_forest-0.1.7-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 9c5151d90caf47d025245dff8828e8355ed325c2644e2d1867c1d91984d4093c
MD5 9b7489f955bc81ee25b349b28979c5e3
BLAKE2b-256 5a680380023962999809b3805baa441899f68b57cc8c46c809aac402707a90bc

See more details on using hashes here.

File details

Details for the file deep_forest-0.1.7-cp39-cp39-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for deep_forest-0.1.7-cp39-cp39-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 69d811d38d6bac425ed3710bf693b1cdf0819d2e513706ecf3f7ca7ca0452faa
MD5 3ef35e01d4206ca9a0c826c002302cc3
BLAKE2b-256 5c8babf03aa7dfc3fac933ae18b9e53e85a0dec513a7ceb5e586aacc2762f1e2

See more details on using hashes here.

File details

Details for the file deep_forest-0.1.7-cp39-cp39-manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for deep_forest-0.1.7-cp39-cp39-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 0f3ece8e71a211d4dd6fcd0e5a8b449406ee2ace29be7fbda1963a59cfd80127
MD5 839f1675c22a2cdc956a8f1b2ed487f3
BLAKE2b-256 0cab21af75905807fe0fda589f3616cae6e977ae928cf2e32c02ecb5cfa24541

See more details on using hashes here.

File details

Details for the file deep_forest-0.1.7-cp39-cp39-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for deep_forest-0.1.7-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b049c3c849e315d6212ef0428b7e80e3bc906b2fc91d84694917ccacfe74c632
MD5 f15cbf61713a70eb0ac555140ae2d1a7
BLAKE2b-256 25cfe462c7c6650dc930f28e8ae13d38629ec20ca59bbf38a273f0f4c9c36230

See more details on using hashes here.

File details

Details for the file deep_forest-0.1.7-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for deep_forest-0.1.7-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 26fd97a04632bbc6cf264048dc3cc31a3d056d28e9aa1359a89e633abf189475
MD5 9ccd819dad121ceb198ccbc63dbadc85
BLAKE2b-256 d71d68fb2ce974d287db78e8a9d1efe17e0bac69314e1faa3611c5d05884d7f6

See more details on using hashes here.

File details

Details for the file deep_forest-0.1.7-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for deep_forest-0.1.7-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 577423bd77ea170db4958f6616de7ed6573a09d5228019b1f6ee5e1910fab31b
MD5 fb7995f507613c009455f5d6a006ace3
BLAKE2b-256 1a1f571d53d29cf9541d74af2cb0b58557114a7724b662d934bc5af109bd4c93

See more details on using hashes here.

File details

Details for the file deep_forest-0.1.7-cp38-cp38-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for deep_forest-0.1.7-cp38-cp38-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 35bcccfc5554d36c54e3ccf9a98bae24abb10d757eeed8cf271fb55599a9eea8
MD5 fa3f850fd09b4f664cf5180859f82ca1
BLAKE2b-256 889b66bf7c99d731eb13a9dd4575109a5419b7305f5a76ad2f11fcf4ec38bc31

See more details on using hashes here.

File details

Details for the file deep_forest-0.1.7-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for deep_forest-0.1.7-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 658089d112f79a3f31c5116d76456cbf8709c6108862800d5232c5918f8d7f20
MD5 0f56973e1647fa0cd8f68e103aa9a14c
BLAKE2b-256 475e08690c688b6fd6201135bd59ee4306682fd9728eca488ac538ccd613ec9b

See more details on using hashes here.

File details

Details for the file deep_forest-0.1.7-cp38-cp38-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for deep_forest-0.1.7-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 fd7c21ff48ef4645dd46011db92cf64455fec6fa241a09919db682a4171967e4
MD5 3c3148dbf384089fbf2741291e4adf3f
BLAKE2b-256 e46bd280c906edb4fd27ac354270fc243fc9d01520c6a45c7429ad05d6207000

See more details on using hashes here.

File details

Details for the file deep_forest-0.1.7-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for deep_forest-0.1.7-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2d84efe56e06f282937b002f4e84b5918e86ea8c849a6f9cf07bbb9da2e16fc1
MD5 c7195d7a95c9ec981d4cda284e9a53fa
BLAKE2b-256 e9eefd8efed15837fb7496c21a928062627bdc15681c53fc81672b7a34c52ae3

See more details on using hashes here.

File details

Details for the file deep_forest-0.1.7-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for deep_forest-0.1.7-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 47f306d5a2fc91342d47299db55b949cf381089457b466238d91701d8cc37f88
MD5 3013df28ed14adcc65c5b9f5efe7422a
BLAKE2b-256 67b4cf8a4753e2afacecfbed369cf482d3b046375a8ff66196ba208d45ca7c69

See more details on using hashes here.

File details

Details for the file deep_forest-0.1.7-cp37-cp37m-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for deep_forest-0.1.7-cp37-cp37m-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0cfce858448a075521d81fd740f84de2c0ae66c78a67f2d57be8fae8d78fd4a3
MD5 78e8f3153b7ac861508ca23b9304cc8f
BLAKE2b-256 588616b48a2d47538cfc144521efd4b878840891937f97b6334e5d4ba8b17168

See more details on using hashes here.

File details

Details for the file deep_forest-0.1.7-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for deep_forest-0.1.7-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 8cc1d184afeee71c7d0197143a72ee390be18b6c2456612191b00874b6900f50
MD5 daa2505ba41331d1cfbd2b1ef720dedb
BLAKE2b-256 21c9542dddcbf407e3f793caed8c6078985bbbf82395b33221971d0ee7666b5e

See more details on using hashes here.

File details

Details for the file deep_forest-0.1.7-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for deep_forest-0.1.7-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1442ae6790f7557020f1d3dcd230661faae2f3ad89ac11c2c4119f98df387175
MD5 83ee114cf490c3681db30c03f6887a64
BLAKE2b-256 64ee232d438464b6e330675e5d2a7db3ecd46d6fdc70752ddffeda838cffd77e

See more details on using hashes here.

File details

Details for the file deep_forest-0.1.7-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for deep_forest-0.1.7-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1b157d5d1acf023b341e869b4a3d45ebb1b8591fd8f175b6946637009e108c44
MD5 f7dec71ae6a62969e7ce0494ec191410
BLAKE2b-256 a60132f6da43bb722d54938865da2336bcbf3208728f9ba92f3913169fec6002

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page