Skip to main content

Collection of training and inference decision forest algorithms.

Project description

TensorFlow Decision Forests

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.

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-0.1.3-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (6.1 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

tensorflow_decision_forests-0.1.3-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (6.1 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

tensorflow_decision_forests-0.1.3-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (6.1 MB view details)

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

tensorflow_decision_forests-0.1.3-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (6.1 MB view details)

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

File details

Details for the file tensorflow_decision_forests-0.1.3-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-0.1.3-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 dc45e780eed241313a0183e0c2b615e41665ff5a3f345d94dbb78ba841b6b39d
MD5 63d1ddc0dd7a63a32c55918b27284394
BLAKE2b-256 3f889302fe5272fdfaaddab55af017a42303af4db04fe9d36cd0b23f1097f193

See more details on using hashes here.

File details

Details for the file tensorflow_decision_forests-0.1.3-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-0.1.3-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 11ab3582092d1932a03afa930643e8558dd8608ca8eb41f1778e370bca198b4d
MD5 d6aa98a5cfd289ce33f1ee2eee7e8da2
BLAKE2b-256 6db83a210fb2a9ba0f65a24a3a534e78875827d3d639e4086f70ef4ffe884615

See more details on using hashes here.

File details

Details for the file tensorflow_decision_forests-0.1.3-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-0.1.3-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 9c9acbfba0042b39e4272639b4e362d0e654b0e89c6856207e1fe0973ac5369e
MD5 691b7885b7e1de3b1f7ffd1203f4a47e
BLAKE2b-256 90ae8b9c0893e04467005cb81cbd926b76b9ade1da3f620be6712f8f0c57beeb

See more details on using hashes here.

File details

Details for the file tensorflow_decision_forests-0.1.3-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-0.1.3-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 5dea9d7fec3fe46411bf9b4cfaf3a87879bdffea9d7fa5bf78f0d31ec6646d0d
MD5 f4169c63a0a05cfcb6d125e8954e69b1
BLAKE2b-256 01f0e61c7c05170525b094a7aa979e970b3bb47559db6b19ae8b12ba376c2ab0

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