Skip to main content

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:

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.

Citation

If you us Tensorflow Decision Forests in a scientific publication, please cite the following paper: Yggdrasil Decision Forests: A Fast and Extensible Decision Forests Library.

Bibtex

@inproceedings{GBBSP23,
  author       = {Mathieu Guillame{-}Bert and
                  Sebastian Bruch and
                  Richard Stotz and
                  Jan Pfeifer},
  title        = {Yggdrasil Decision Forests: {A} Fast and Extensible Decision Forests
                  Library},
  booktitle    = {Proceedings of the 29th {ACM} {SIGKDD} Conference on Knowledge Discovery
                  and Data Mining, {KDD} 2023, Long Beach, CA, USA, August 6-10, 2023},
  pages        = {4068--4077},
  year         = {2023},
  url          = {https://doi.org/10.1145/3580305.3599933},
  doi          = {10.1145/3580305.3599933},
}

Raw

Yggdrasil Decision Forests: A Fast and Extensible Decision Forests Library, Guillame-Bert et al., KDD 2023: 4068-4077. doi:10.1145/3580305.3599933

Contact

You can contact the core development team at decision-forests-contact@google.com.

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

Apache License 2.0

Release files for tensorflow-decision-forests 1.12.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for tensorflow-decision-forests 1.12.0
File
tensorflow_decision_forests-1.12.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
tensorflow_decision_forests-1.12.0-cp312-cp312-macosx_12_0_arm64.whl CPython 3.12 CPython 3.12 macOS 12.0+ ARM64 Details
tensorflow_decision_forests-1.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
tensorflow_decision_forests-1.12.0-cp311-cp311-macosx_12_0_arm64.whl CPython 3.11 CPython 3.11 macOS 12.0+ ARM64 Details
tensorflow_decision_forests-1.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
tensorflow_decision_forests-1.12.0-cp310-cp310-macosx_12_0_arm64.whl CPython 3.10 CPython 3.10 macOS 12.0+ ARM64 Details
tensorflow_decision_forests-1.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
tensorflow_decision_forests-1.12.0-cp39-cp39-macosx_12_0_arm64.whl CPython 3.9 CPython 3.9 macOS 12.0+ ARM64 Details

Total release size: 113.4 MB

Release files / tensorflow_decision_forests-1.12.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL tensorflow_decision_forests-1.12.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 16.1 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
d80ad5f29efa566adfd09fca61584a41666a20e064585a64c777a1df85a5d2e6
BLAKE2b-256 checksum
How to use checksums
76ff359b34530d03343d294ee3e27b8155f627b8571a3558ba396b1955d83ad7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.6

Release files / tensorflow_decision_forests-1.12.0-cp312-cp312-macosx_12_0_arm64.whl

Download URL tensorflow_decision_forests-1.12.0-cp312-cp312-macosx_12_0_arm64.whl
Size 12.2 MB
Tags CPython 3.12 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
14ffa15864d10782445044302e42d0d88d07536669578f66fbeccdc20b1a9ed2
BLAKE2b-256 checksum
How to use checksums
31cf8b6850fc8b55d5477e54687533cf5019df41e64621e57a6d27cb3ca1a41a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.6

Release files / tensorflow_decision_forests-1.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL tensorflow_decision_forests-1.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 16.1 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
990dcac0874c4b8cf646ab3438b8f804c522e8ebcc0b35116ea02cf05f46e026
BLAKE2b-256 checksum
How to use checksums
5f15d56faf9524d42676d90a1a1e362254236f29e2cd1ca99ff3281f4beb7fb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.6

Release files / tensorflow_decision_forests-1.12.0-cp311-cp311-macosx_12_0_arm64.whl

Download URL tensorflow_decision_forests-1.12.0-cp311-cp311-macosx_12_0_arm64.whl
Size 12.2 MB
Tags CPython 3.11 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
43e11ffcb18a097789ecfde0871a5130d6ffb8a6aaaf2307c072faa74f6d9f48
BLAKE2b-256 checksum
How to use checksums
d7c5964260e4907161358ce038b060393621702eedbbbb79d2878c6a13424260
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.6

Release files / tensorflow_decision_forests-1.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL tensorflow_decision_forests-1.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 16.1 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
41401e6b24e958e5edb8e354de76a3e290e707050ca8190acd65b030aafc139c
BLAKE2b-256 checksum
How to use checksums
1ce201837866e38ddd2344e2a5442b280cbbd748180b26851c89f5b7f120903e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.6

Release files / tensorflow_decision_forests-1.12.0-cp310-cp310-macosx_12_0_arm64.whl

Download URL tensorflow_decision_forests-1.12.0-cp310-cp310-macosx_12_0_arm64.whl
Size 12.2 MB
Tags CPython 3.10 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
d0af6be361121db1317efd29147daae124cc0d98edcf8776b077fc429737ab87
BLAKE2b-256 checksum
How to use checksums
4a3bbd655d294c1ed020b69cb17fbb18e0aa71c9e84e413458aff291ae4286e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.6

Release files / tensorflow_decision_forests-1.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL tensorflow_decision_forests-1.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 16.1 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
6b224809745231204e8e049f98d32b93c04075d9f9ec8d3bbcd5ae4e58ba7db2
BLAKE2b-256 checksum
How to use checksums
6d57afe6b1b4cfde602dff15370cb304383c6ae1abdfb0df7f4b5942b5f63941
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.6

Release files / tensorflow_decision_forests-1.12.0-cp39-cp39-macosx_12_0_arm64.whl

Download URL tensorflow_decision_forests-1.12.0-cp39-cp39-macosx_12_0_arm64.whl
Size 12.2 MB
Tags CPython 3.9 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
3daa473ccf05b7aa33f104212b497698be6c42a74d3e761777314cb88f6822d8
BLAKE2b-256 checksum
How to use checksums
e71f564a925a77dbad894aca7db2696249d63a38a8828f6cb41ceb7cad8196ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

1.12.0 This release

8 release files

1.11.0

6 release files

1.10.1

3 release files

1.10.0

6 release files

1.9.2

3 release files

1.9.1

3 release files

1.9.0

9 release files

1.8.1

10 release files

1.8.0

9 release files

1.7.0

3 release files

1.6.0

9 release files

1.3.0

10 release files

1.2.0

10 release files

1.1.0

10 release files

1.0.0

4 release files

0.2.7

4 release files

0.2.6

4 release files

0.2.5

4 release files

0.2.4

6 release files

0.2.3

4 release files

0.2.2

3 release files

0.2.1

3 release files

0.2.0

4 release files

0.1.9

4 release files

0.1.8

4 release files

0.1.7

4 release files

0.1.6

4 release files

0.1.5

4 release files

0.1.4

4 release files

0.1.3

4 release files

0.1.2

3 release files

0.1.1

3 release files

0.1.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page