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.

Whenever one used tree-based machine learning approaches such as Random Forest or GBDT, DF21 may offer a new powerful option.

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

Installation

The package is available via PyPI using:

pip install deep-forest

Quickstart

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 %
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,
    Author = {Zhi-Hua Zhou and Ji Feng},
    Booktitle = {IJCAI},
    Pages = {3553-3559},
    Title = {{Deep Forest:} Towards an alternative to deep neural networks},
    Year = {2017}}

Acknowledgement

The lead developer and maintainer of DF21 is Mr. Yi-Xuan Xu. Before the release, it has been used internally in the LAMDA Group, Nanjing University, China.

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.2-cp38-cp38-win_amd64.whl (535.3 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

deep_forest-0.1.2-cp38-cp38-manylinux2010_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

deep_forest-0.1.2-cp38-cp38-manylinux1_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.8

deep_forest-0.1.2-cp38-cp38-macosx_10_9_x86_64.whl (541.4 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

deep_forest-0.1.2-cp37-cp37m-win_amd64.whl (526.5 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

deep_forest-0.1.2-cp37-cp37m-manylinux2010_x86_64.whl (2.4 MB view hashes)

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

deep_forest-0.1.2-cp37-cp37m-manylinux1_x86_64.whl (2.4 MB view hashes)

Uploaded CPython 3.7m

deep_forest-0.1.2-cp37-cp37m-macosx_10_9_x86_64.whl (542.7 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

deep_forest-0.1.2-cp36-cp36m-win_amd64.whl (525.9 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

deep_forest-0.1.2-cp36-cp36m-manylinux2010_x86_64.whl (2.4 MB view hashes)

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

deep_forest-0.1.2-cp36-cp36m-manylinux1_x86_64.whl (2.4 MB view hashes)

Uploaded CPython 3.6m

deep_forest-0.1.2-cp36-cp36m-macosx_10_9_x86_64.whl (549.9 kB view hashes)

Uploaded CPython 3.6m macOS 10.9+ x86-64

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