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. 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-0.2.7-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-0.2.7-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-0.2.7-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-0.2.7-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

File details

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

File metadata

File hashes

Hashes for tensorflow_decision_forests-0.2.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 208a6d139a223957603d0803c178c96795a3dbe291c71135e073dab95ad9a529
MD5 c334e403055e4bf2a0d2917a7eccae60
BLAKE2b-256 8ea0dbaa469f64bad883f874535c799170d1a124bc1db8870dc56dbcffef7c0b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tensorflow_decision_forests-0.2.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dd3e725d48e702b453edd3685efae6a62197aeb0bdbf2c34cf704a659f743bf8
MD5 2e55929a20a5998f72760e69c67040d9
BLAKE2b-256 b4f8e21f54be13e4fdd703329d7aa15542ce0055c40f91642e0cd66f9782e377

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tensorflow_decision_forests-0.2.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 669ae2aedf0e8b2784a7fa97991ffa1bed476836873e10c07cb4844d30b92038
MD5 a1a3666fa6b50bc1751f0e8d88cba197
BLAKE2b-256 1b3674104086aa81dd8d8d160995358d8849266bac3136fd90f176c18d933378

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tensorflow_decision_forests-0.2.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 75809dfa68748fc2bdf61f53776fa5ebb522cb523d1e24702b3b85fc353b057a
MD5 5f4b15c5a7e24b94bd765a30f8c1b6fa
BLAKE2b-256 c0a8c0fcd87011da1c9569ab7ccfdffcdf0ae9c8da8bc590c9e8aa761a4b1aa4

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