Skip to main content

Collection of training and inference decision forest algorithms.

Project description

TensorFlow Decision Forests (TF-DF) is a collection of state-of-the-art algorithms for the training, serving and interpretation of Decision Forest models. The library is a collection of Keras models and supports classification, regression and ranking.

TF-DF is a TensorFlow wrapper around the Yggdrasil Decision Forests C++ libraries. Models trained with TF-DF are compatible with Yggdrasil Decision Forests' models, and vice versa. This link explains how to do inference of TF-DF models in C++ using Yggdrasil.

Usage example

A minimal end-to-end run looks as follow:

import tensorflow_decision_forests as tfdf
import pandas as pd

# Load the dataset in a Pandas dataframe.
train_df = pd.read_csv("project/train.csv")
test_df = pd.read_csv("project/test.csv")

# Convert the dataset into a TensorFlow dataset.
train_ds = tfdf.keras.pd_dataframe_to_tf_dataset(train_df, label="my_label")
test_ds = tfdf.keras.pd_dataframe_to_tf_dataset(test_df, label="my_label")

# Train the model
model = tfdf.keras.RandomForestModel()
model.fit(train_ds)

# Look at the model.
model.summary()

# Evaluate the model.
model.evaluate(test_ds)

# Export to a TensorFlow SavedModel.
# Note: the model is compatible with Yggdrasil Decision Forests.
model.save("project/model")

Documentation & Resources

The following resources are available:

Installation

To install TensorFlow Decision Forests, run:

pip3 install tensorflow_decision_forests --upgrade

See the installation page for more details, troubleshooting and alternative installation solutions.

Contributing

Contributions to TensorFlow Decision Forests and Yggdrasil Decision Forests are welcome. If you want to contribute, make sure to review the developer manual and contribution guidelines.

Credits

TensorFlow Decision Forests was developed by:

  • Mathieu Guillame-Bert (gbm AT google DOT com)
  • Jan Pfeifer (janpf AT google DOT com)
  • Sebastian Bruch (sebastian AT bruch DOT io)
  • Arvind Srinivasan (arvnd AT google DOT com)

License

Apache License 2.0

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

tensorflow_decision_forests-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.0 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

tensorflow_decision_forests-1.0.1-cp310-cp310-macosx_12_0_arm64.whl (10.6 MB view details)

Uploaded CPython 3.10 macOS 12.0+ ARM64

tensorflow_decision_forests-1.0.1-cp310-cp310-macosx_10_14_x86_64.whl (11.7 MB view details)

Uploaded CPython 3.10 macOS 10.14+ x86-64

tensorflow_decision_forests-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.0 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

tensorflow_decision_forests-1.0.1-cp39-cp39-macosx_12_0_arm64.whl (10.6 MB view details)

Uploaded CPython 3.9 macOS 12.0+ ARM64

tensorflow_decision_forests-1.0.1-cp39-cp39-macosx_10_14_x86_64.whl (11.7 MB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

tensorflow_decision_forests-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

tensorflow_decision_forests-1.0.1-cp38-cp38-macosx_12_0_arm64.whl (10.6 MB view details)

Uploaded CPython 3.8 macOS 12.0+ ARM64

tensorflow_decision_forests-1.0.1-cp38-cp38-macosx_10_14_x86_64.whl (11.7 MB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

tensorflow_decision_forests-1.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.0 MB view details)

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

tensorflow_decision_forests-1.0.1-cp37-cp37m-macosx_10_14_x86_64.whl (11.7 MB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

File details

Details for the file tensorflow_decision_forests-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a49a3e953197ffc47989a9afefbb262352bea6a3108f126d2778fd0541086d6e
MD5 b50cd9e2fa02dbbcb96ac213f67ee974
BLAKE2b-256 8c9cf705522fe3eefbbad1eeb56e918bce50ea0b2e97f972b538c4407000fbd9

See more details on using hashes here.

File details

Details for the file tensorflow_decision_forests-1.0.1-cp310-cp310-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-1.0.1-cp310-cp310-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 c09c00e3fb022a566a52ccb557698f612cd0365093b0ffac8daaaa024f54daec
MD5 8c050d5f04215bcd23d45fe3a99438d6
BLAKE2b-256 e5511e1ece90f90ea5663146d5a4f657b00f121b3267fc606c8a83f1ae8f0bb4

See more details on using hashes here.

File details

Details for the file tensorflow_decision_forests-1.0.1-cp310-cp310-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-1.0.1-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 e1d56abb59ac959335f5784aa97f8378a920f6c3dd63a08763900324e201b946
MD5 8e08acf920c2465dc35da21680510905
BLAKE2b-256 4ace13f3e2595dbb87e742931a8db658822dc0e8f07c68777fd2b4b07b77ed03

See more details on using hashes here.

File details

Details for the file tensorflow_decision_forests-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 608c4b752a0b252f72ca8b0a11b0623a5c8a84df722ab30763bce5b26bd2cebd
MD5 2ee7283c50b08e888bb93ef677269018
BLAKE2b-256 7b02b5709a7b740722058b120fd9162d5a78026b8effe47945b6aaec7388b9f1

See more details on using hashes here.

File details

Details for the file tensorflow_decision_forests-1.0.1-cp39-cp39-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-1.0.1-cp39-cp39-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 ddcf3297279e81cfe45b696be6a5a1ccc30cb7e7cedf3babab9f188e67da278a
MD5 48558de5c4274a3cd624ddd778223c0e
BLAKE2b-256 4d677f5c29f2f726f5378b40046b60ea6e951f2bb8c2369f56a5a5e3887a0d55

See more details on using hashes here.

File details

Details for the file tensorflow_decision_forests-1.0.1-cp39-cp39-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-1.0.1-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 fd240c827b4c6692ef2a751d671efdf0acd03d8d006f180a01fe020cfeccb141
MD5 86dc3668bcbed184f78e3c66d03184dd
BLAKE2b-256 3a863f22c5bb397c8a7dbd66f838e821389934bf1847402c558f819f4a802fe0

See more details on using hashes here.

File details

Details for the file tensorflow_decision_forests-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0f5d7c266369dd313ca1631f6b72fb1da17cf6d341d04c13b03f94e8d7001e48
MD5 63b6e1b12f9781ed12fdff0cb734c901
BLAKE2b-256 2f3c31a5fad3780d1ad662e4db2a986d5d64891db6ca6b82fee2fda6249f042f

See more details on using hashes here.

File details

Details for the file tensorflow_decision_forests-1.0.1-cp38-cp38-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-1.0.1-cp38-cp38-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 e72ae3c754deb6f51f148e7440fe2ed99d1df90994e468e80b42989669e61c16
MD5 1ca3c02c77dcadfd311a3fe758e763a6
BLAKE2b-256 4793ac1e0abbb207428996775684a47f439d02a7cc87341abb04732a88e0d0fe

See more details on using hashes here.

File details

Details for the file tensorflow_decision_forests-1.0.1-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-1.0.1-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 051442ce8fdaa836d8598bf86d6143cef7059a279ee3983c900eb394f3009153
MD5 d5e8b3c587e4cc978db606643cb21a82
BLAKE2b-256 a6e6531e26b845b1bf1349d102362236d080c63436a9371c51784e3e1c9cb9bb

See more details on using hashes here.

File details

Details for the file tensorflow_decision_forests-1.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-1.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0bbc83e6572e6b4bc9ef38f8eb9cf69dd59c0cf15a5d178adcd666437add22fc
MD5 91bce17fa1a6b8bdb6a700579289bcf9
BLAKE2b-256 c19a0362dc61d7685e1a792e5036a77dd66b564ac6f2f13a54362d430eaef2c4

See more details on using hashes here.

File details

Details for the file tensorflow_decision_forests-1.0.1-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-1.0.1-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 c914ae055b0e7a9e4d994bbc9ee475753fec6e7be1a50e7f80ba762dd791a0d4
MD5 27ddaaf28e76b34d24f1fcdb724ae59f
BLAKE2b-256 bb4f42cb62107f7b50fe5e8825dd50deed754d2b7629d91e9a013f470ac3858f

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