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.5-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.5-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.5-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.5-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.5-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-0.1.5-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 1157cb6c9ea9f427a3b29cf3af62f66b1de01eb3d5e6928aba912d9fdf5c7819
MD5 be1c0c3889b588982665aa6ada9b073f
BLAKE2b-256 dfcb57c0664ba9b84d69f061c691f44ce2460f40ee3184315f5e20f5f92b5940

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tensorflow_decision_forests-0.1.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 6c6eccf16aeff421056d4a2d7898b3b8620bf9f38cc9b840bec55145ecdc606e
MD5 1a85130d80564643c2244a02df946335
BLAKE2b-256 8306e1c105746fa6fd45b473b80e7c94c9d6dcc3bb4d337cb73519fbdf1a6be1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tensorflow_decision_forests-0.1.5-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 ad30be4d66da6efb9c38ee5fd3577440e75875ef3af37ce8b45e3a089ab3ba7b
MD5 a1f4901f756f6763451445a4264b8e4e
BLAKE2b-256 ef1e7d2c17018512c8e6d583ccea433eecd5e93c18c7e273bc896a857789a098

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tensorflow_decision_forests-0.1.5-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 5f2dc18752467ac36f413fb989ef3d9057e3d4d2f147ee64f3afd581dc1a224f
MD5 562be1234d1b69e889b5744602f3894f
BLAKE2b-256 fcc3b383a44f4b72e0cdcfbd5b461c26e874b65fb9bdd76619f38803c961ff77

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