Collection of training and inference decision forest algorithms.
Project description
TensorFlow Decision Forests (TF-DF) is a library to train, run and interpret decision forest models (e.g., Random Forests, Gradient Boosted Trees) in TensorFlow. TF-DF supports classification, regression and ranking.
TF-DF is powered by Yggdrasil Decision Forest (YDF, a library to train and use decision forests in C++, JavaScript, CLI, and Go. TF-DF models are compatible with YDF' models, and vice versa.
Tensorflow Decision Forests is available on Linux and Mac. Windows users can use the library through WSL+Linux.
Usage example
A minimal end-to-end run looks as follows:
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")
Google I/O Presentation
Documentation & Resources
The following resources are available:
- TF-DF on TensorFlow.org (API Reference, Guides and Tutorials)
- Tutorials (on tensorflow.org)
- YDF documentation (also applicable to TF-DF)
- Issue tracker
- Known issues
- Changelog
- TensorFlow Forum (on discuss.tensorflow.org)
- More examples
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)
- Richard Stotz (richardstotz 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-1.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: tensorflow_decision_forests-1.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 16.8 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d685e92abe44920ee6d89394ec4e075bb1ada7402f673566146e1b476a576e96 |
|
MD5 | c180d03a2850bb6eec0a61c5e8c71ff2 |
|
BLAKE2b-256 | 19b8a119f26542aeb8ed25f6cceb7e640c2998b743997c6c1be31c0f4e84f33a |
File details
Details for the file tensorflow_decision_forests-1.5.0-cp311-cp311-macosx_12_0_arm64.whl
.
File metadata
- Download URL: tensorflow_decision_forests-1.5.0-cp311-cp311-macosx_12_0_arm64.whl
- Upload date:
- Size: 11.3 MB
- Tags: CPython 3.11, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 804f6bed277b5c5b6d2bd85738a64973d5d3e8e6ac06abf6098545740245cedc |
|
MD5 | d3cbebf6e3638be1a87977bce4cf0d36 |
|
BLAKE2b-256 | 3e8b48eccda39c838a1b59c115230be634e54d5a013ab90f8df4f39daaad7946 |
File details
Details for the file tensorflow_decision_forests-1.5.0-cp311-cp311-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: tensorflow_decision_forests-1.5.0-cp311-cp311-macosx_10_15_x86_64.whl
- Upload date:
- Size: 12.3 MB
- Tags: CPython 3.11, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1209a2832ac65f8f74bd9d0c1d58f3f8b771e7fa5c9d504c547842311647b7d4 |
|
MD5 | 6bc8c2d538c19a0bb70498d22c4f7871 |
|
BLAKE2b-256 | c169aa3fc64bd7ba499049583fef0c6be144984606eecd745e56438b331ff3d6 |
File details
Details for the file tensorflow_decision_forests-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: tensorflow_decision_forests-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 16.8 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a43af2a5a8c34e550bf549c6cad96da271979efc5a8ec988f6f76cc90770415a |
|
MD5 | cf1fc5d338167e8496c02a9fe61552ea |
|
BLAKE2b-256 | 7d76ff06d482ac0893bf819489a5684461e4ddd7701da379425a96690ff48770 |
File details
Details for the file tensorflow_decision_forests-1.5.0-cp310-cp310-macosx_12_0_arm64.whl
.
File metadata
- Download URL: tensorflow_decision_forests-1.5.0-cp310-cp310-macosx_12_0_arm64.whl
- Upload date:
- Size: 11.3 MB
- Tags: CPython 3.10, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22e3835acbfbd5356bb2f8e0c973dfc40ef80a7924b793e90c811158448cfe77 |
|
MD5 | 01dc10abdc40d4201e0c9c6658dc3274 |
|
BLAKE2b-256 | c0fa24fdefa3aa8c63326b93b3709159d0e8266657379da9cc41c90ca7689ee4 |
File details
Details for the file tensorflow_decision_forests-1.5.0-cp310-cp310-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: tensorflow_decision_forests-1.5.0-cp310-cp310-macosx_10_15_x86_64.whl
- Upload date:
- Size: 12.3 MB
- Tags: CPython 3.10, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43ffd4fba1c3376f58a9dcee943df80f0cff6e47224d109ad0389a723c74947c |
|
MD5 | ac0c9ebefb0596ad8291ec5120fe0f8d |
|
BLAKE2b-256 | b4ac056e66a222bfb48071e6beb899d0fef220f786b7b7e234bc3aef0bcfffad |
File details
Details for the file tensorflow_decision_forests-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: tensorflow_decision_forests-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 16.8 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ec4297eb5e7c4110cf8aae89e9b08b9ad2cb725e3e63c89c78304c0d7235d24 |
|
MD5 | d2b2e1772437d23c1212db1c0e41007c |
|
BLAKE2b-256 | 6784dc181dc6d4ec2692432bb168119e932a3175ffcfddcca41bc8a1a6d5a8b9 |
File details
Details for the file tensorflow_decision_forests-1.5.0-cp39-cp39-macosx_12_0_arm64.whl
.
File metadata
- Download URL: tensorflow_decision_forests-1.5.0-cp39-cp39-macosx_12_0_arm64.whl
- Upload date:
- Size: 11.3 MB
- Tags: CPython 3.9, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbd403acf736bb9b4afd2985d9056e6d5043fc4b9a31bd05e5fcae2b1d413dc3 |
|
MD5 | 2c3a4c95fd954096512fde114252d6d3 |
|
BLAKE2b-256 | 760e4519e03e1cb2e31bacb6a8810aa449ea5ed3bef89d5915483c87b6f50918 |
File details
Details for the file tensorflow_decision_forests-1.5.0-cp39-cp39-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: tensorflow_decision_forests-1.5.0-cp39-cp39-macosx_10_15_x86_64.whl
- Upload date:
- Size: 12.3 MB
- Tags: CPython 3.9, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04fd913627d08fe54514b179c612e87eebf55f1448bf01951660985dfa14a6e1 |
|
MD5 | f7d3fbb0f6ea4ace2b3379871ecd52e7 |
|
BLAKE2b-256 | a0c984044be91c1857247f2613c964a115e22c591628bdfdfcab66460faed241 |
File details
Details for the file tensorflow_decision_forests-1.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: tensorflow_decision_forests-1.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 16.8 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d137241dad8e884d0c937aa8769fe0768324804e9ba666a78b7b5f2f536a0bd2 |
|
MD5 | 7877f770ac246e68bfa3ab42f95d68fc |
|
BLAKE2b-256 | 59f199f610681797d3a54d41c4d4ddb81d6fa5121a4b4ac3196235b50e31c4be |
File details
Details for the file tensorflow_decision_forests-1.5.0-cp38-cp38-macosx_12_0_arm64.whl
.
File metadata
- Download URL: tensorflow_decision_forests-1.5.0-cp38-cp38-macosx_12_0_arm64.whl
- Upload date:
- Size: 11.3 MB
- Tags: CPython 3.8, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a0df3a3be5751594d49f5a8f99977b553cf1c42f320b952ac2a2f67b85283f5 |
|
MD5 | a441baaca2c083b95f5789ad0a7b6997 |
|
BLAKE2b-256 | 8cfaeb0e6e61e105d66ac23d044c1b1036f2ca46fd6a4d9095d9b0aa58f25966 |
File details
Details for the file tensorflow_decision_forests-1.5.0-cp38-cp38-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: tensorflow_decision_forests-1.5.0-cp38-cp38-macosx_10_15_x86_64.whl
- Upload date:
- Size: 12.3 MB
- Tags: CPython 3.8, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5d8c3730578bda55a8f520ae39b0c9b2560d69bd53b57882e5371c1a82ba098 |
|
MD5 | f53c9eb77e118f140ca5cd95aa482f1d |
|
BLAKE2b-256 | 70a0c33c99899e44429694fc94e0f04db444f25cc3b08ee09e9c92b30975e663 |