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

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

tensorflow_decision_forests-0.1.8-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (6.3 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

tensorflow_decision_forests-0.1.8-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (6.3 MB view details)

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

tensorflow_decision_forests-0.1.8-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (6.3 MB view details)

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

File details

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

File metadata

File hashes

Hashes for tensorflow_decision_forests-0.1.8-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 63ac5e416d8d192191d22964eeb9e0361dc7c65d9eee9cbb35b36a731eefb0ab
MD5 d331b78241f17457c1d8fbb0eb60a9b5
BLAKE2b-256 266c8b85f6725a43f9dc644d62b563149f3b7e0e5665bd1a5d73c698ac6a1bd3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tensorflow_decision_forests-0.1.8-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 ff864eeede8837707edf5dcdfa33981881fed6edeae6eb2b1a566b4b98303e11
MD5 7aa2f86853601e25c34d07dc524ea740
BLAKE2b-256 cf37731a5ba0590d6f438db5e0a71df59896c7a3ae4d13b852b85b4a5fcbe352

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tensorflow_decision_forests-0.1.8-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 6976a50f42a0b2eda7d35960b6cfe3eb825f911dc37e36f0b3b1ff4be5f4495d
MD5 3f568c47609c4ef78a53432807b54094
BLAKE2b-256 b3aba6283d1fbf32ca1bb5ba37b2ab3762a96c2b9c3e6ae282d4082a479f4781

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tensorflow_decision_forests-0.1.8-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 42b65bdecf6485efebdb7817807b450400843ac7669083be8d06d607fbc9a6e3
MD5 4659bbaa8160addb94c9cc7cc1352c59
BLAKE2b-256 df73615fac8581abfba61e31dae9f34bbc27ec6b60ab648a7e2fb2c8c4babbd2

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