Skip to main content

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

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

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-1.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.4 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

tensorflow_decision_forests-1.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.4 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

tensorflow_decision_forests-1.3.0-cp310-cp310-macosx_12_0_arm64.whl (10.9 MB view details)

Uploaded CPython 3.10 macOS 12.0+ ARM64

tensorflow_decision_forests-1.3.0-cp310-cp310-macosx_10_15_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

tensorflow_decision_forests-1.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.4 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

tensorflow_decision_forests-1.3.0-cp39-cp39-macosx_12_0_arm64.whl (10.9 MB view details)

Uploaded CPython 3.9 macOS 12.0+ ARM64

tensorflow_decision_forests-1.3.0-cp39-cp39-macosx_10_15_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

tensorflow_decision_forests-1.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.4 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

tensorflow_decision_forests-1.3.0-cp38-cp38-macosx_12_0_arm64.whl (10.9 MB view details)

Uploaded CPython 3.8 macOS 12.0+ ARM64

tensorflow_decision_forests-1.3.0-cp38-cp38-macosx_10_15_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

File details

Details for the file tensorflow_decision_forests-1.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-1.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b3b5456bd7bf72c14061e2c141087f8ac9d801dd4e428aa50ea0048a6070cd3e
MD5 bbeafd8f37205459aaf235577dccb151
BLAKE2b-256 08db904197bea7c3a3918a8a615f6a451e8bcc94b794e507700478b6a8526cf2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tensorflow_decision_forests-1.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dbd9b8563af9ad5d56381fe483d75e593c8ecb820f1f671a79cc74fafc906225
MD5 92e18ea0675b9fd64686695c40af5974
BLAKE2b-256 ca9f5e0d9cfa149858b9c49adcf99a210b7e09738be00ecc2e201b29b90f1ffb

See more details on using hashes here.

File details

Details for the file tensorflow_decision_forests-1.3.0-cp310-cp310-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-1.3.0-cp310-cp310-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 809e232a1057c59aa2e1bba50fa95edcecfa1b1f8f4ee3c135323996926780ac
MD5 bf09dc8bab292a6714e128b2bdfe0df5
BLAKE2b-256 7aa4e818814fec37812222f77ae85b41bd6a95c4c90b0b92e03c9c9577601056

See more details on using hashes here.

File details

Details for the file tensorflow_decision_forests-1.3.0-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-1.3.0-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 51d1989e951b36a524cc95d7ade74da9ef50768aa473ba56576f1efe453aafd7
MD5 1cb988a15358a14c9ac5e25aa637a29e
BLAKE2b-256 e15ac22d45351691e4116505c8ce69f3500a23e1cc960fbf2f23e7d1ab476701

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tensorflow_decision_forests-1.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bb8b07d3e39e00153428288202e1393991308411c0af542afdc7b721856aa15a
MD5 dc8e093dc8224101644da8dc5db9736a
BLAKE2b-256 a5797932056074c0315fe0887f32c220292dd1ff66e305166a98837aafcc3a88

See more details on using hashes here.

File details

Details for the file tensorflow_decision_forests-1.3.0-cp39-cp39-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-1.3.0-cp39-cp39-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 fbb2acfe0a2268d33a58045f152cb0b0b502dfcfffceb1a585ca7e53edc90b2b
MD5 e6ed3fba4a6eb5fc845e93b30f562eea
BLAKE2b-256 5256ef491103f01da479674b3613167281d0a5e38cb5427cf95e2810553f72ea

See more details on using hashes here.

File details

Details for the file tensorflow_decision_forests-1.3.0-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-1.3.0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 2a26b36bbd84b9c13661c43e856baa39c049d03d96a9b03bed52e7e2fa832c86
MD5 214933abf889082a2f379ca5c3c1cdbc
BLAKE2b-256 cd128e44dc648d051580d82d254f35ff8d98573a3d60f62c3da68f59bdcad4cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tensorflow_decision_forests-1.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9729973a6b16ee75161cf2e8d68a8fddef3988db8e05734b94a3fad6780a916d
MD5 88978c02d3294e353b9d0aa40769aa4c
BLAKE2b-256 a54431b617e6360b243b82ac72e94d1eedf078d2d8758447c90655e5fa94d8c6

See more details on using hashes here.

File details

Details for the file tensorflow_decision_forests-1.3.0-cp38-cp38-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-1.3.0-cp38-cp38-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 1cb4d94689a2e9836b986706feeac3ae32f304311d92878ea93895386ed98128
MD5 5fdb5aa3be8f68683946e875ad945a20
BLAKE2b-256 70164296a9d1e740921604da725e48442bfd86bd05b81a4d8e357cb437eeb4eb

See more details on using hashes here.

File details

Details for the file tensorflow_decision_forests-1.3.0-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for tensorflow_decision_forests-1.3.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 123c6a896b90ca6e21cb571c3909e848a0242f799d9e93cd36891eb5016509f0
MD5 0137b8bea1d22fd2ad1084723e8b59e7
BLAKE2b-256 dbb3ec8d445c03f098f63851242b6f242dea4b298c19bc48e90f03acd5082a56

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