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:
- TF-DF on TensorFlow.org (with the API Reference and Tutorials)
- Notebook tutorials (on Github)
- Notebook tutorials (on tensorflow.org)
- Migration guide from Neural Network to Decision Forests
- Issue tracker
- Known issues
- Changelog
- Discuss on TensorFlow.Org
- Yggdrasil documentation (for advanced users and C++ serving)
- Distributed Training
- TF-DF in TensorFlow Serving
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file tensorflow_decision_forests-0.2.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: tensorflow_decision_forests-0.2.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 17.7 MB
- Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 356114f945c6c93fbffca6ec89bf66ff7477d9b42c568237c8483aa334d53233 |
|
MD5 | ed69b0c2722f5b655346827e2fee1d64 |
|
BLAKE2b-256 | ac76bdf017b60e97ff024565a27e5162e9fb45ec882647ae896263067b1f114c |
File details
Details for the file tensorflow_decision_forests-0.2.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: tensorflow_decision_forests-0.2.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 17.7 MB
- Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6a0bbac5ddc21e20ec95dd20b394262c14c1dbdd2adb862cba4353274eae217 |
|
MD5 | e1bcd62040e1f3f7e9d1f84e8e4ae0f6 |
|
BLAKE2b-256 | 2a78bf49937d0d9a36a19faca28dac470a48cfe4894995a70e73f3c0c1684991 |
File details
Details for the file tensorflow_decision_forests-0.2.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: tensorflow_decision_forests-0.2.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 17.7 MB
- Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cccc0439692c2696e905f94b7e2d3118d20778f1619ff77a6ce639c405b71db |
|
MD5 | 2bfe2ac08fcda2374f1de3ddf923bd52 |
|
BLAKE2b-256 | f37d14d4f3b15ba7b149ec679096ec611b4a0961f9ead070c6507ffa1de12fc5 |