Skip to main content

Collection of training and inference decision forest algorithms.

Project description

TensorFlow Decision Forests

TensorFlow

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

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

tensorflow_decision_forests-0.1.6-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (6.2 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

tensorflow_decision_forests-0.1.6-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (6.2 MB view details)

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

tensorflow_decision_forests-0.1.6-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (6.2 MB view details)

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

File details

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

File metadata

File hashes

Hashes for tensorflow_decision_forests-0.1.6-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 a5786f643b266b02c8ca39adeb7e93ccc88b9b0629592f2aa96707d3b90d5a8b
MD5 b35a902757b630865761b653b8f9a748
BLAKE2b-256 8ae1eeae8afe1efd209fa12c3e01cdbefefb1dff06d667c795a090fec67495fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tensorflow_decision_forests-0.1.6-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 3762186ea70ea0390765db36b5e95bf0dfee248234506fcea7499b130aa63cdf
MD5 7f0ca644171eacb48745a09581783503
BLAKE2b-256 2ef5fea5228a602796fbd5ab0538399b2c385f8f8d2db2405b1776580cdad786

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tensorflow_decision_forests-0.1.6-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 f1b8dfcf78f28fa83780c6c1f521b5019d08f3f704c9bd2339e4a183aa61f770
MD5 2accc883c2c1cff236ec39db8848b747
BLAKE2b-256 4994ff73f21695908de16febd5948ee7fd80d72e0b46fd7dc554aea02e250b80

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tensorflow_decision_forests-0.1.6-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 fbaa2a2057223fe6b5899fb16469ef9d86108bd8419423faa8f0112b4c648607
MD5 c8d1218afc91ccefd16055005d4b3d12
BLAKE2b-256 062a77c67f76e788b5701c997c17a066dd1f292a5d4f631bddad68b5ad43a9c1

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