tensorflow-decision-forests
Collection of training and inference decision forest algorithms.
Decision gist · record as of 2026-08-14
Yes, if you are already using TensorFlow and need tree-based models. The library is actively maintained, has no known vulnerabilities, and integrates cleanly with TensorFlow's ecosystem. Medium install friction is acceptable for a compiled package. Not recommended for Windows users without WSL, or for projects not already committed to TensorFlow.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires TensorFlow installed; available on Linux and macOS only (Windows users must use WSL+Linux).
- Medium install friction due to compiled dependencies and platform-specific wheels.
- Active maintenance with recent commits and no known vulnerabilities.
License · maintenance · safety
Apache 2.0 (permissive) — Apache 2.0 permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and state significant changes.
last release 2025-03-13 (519 days) · last repo commit 2026-05-19 · 693 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 555,172 downloads/mo, #6,028 on PyPI
Alternatives
Verify before relying
pip install tensorflow_decision_forests
import tensorflow_decision_forests as tfdf
import pandas as pd
train_df = pd.read_csv("train.csv")
train_ds = tfdf.keras.pd_dataframe_to_tf_dataset(train_df, label="my_label")
model = tfdf.keras.RandomForestModel()
model.fit(train_ds)- Whether the nine runtime dependencies (numpy, pandas, tensorflow, six, absl_py, wheel, wurlitzer, tf_keras, ydf) are all required or some are optional.
- Performance characteristics compared to other decision forest libraries when handling large datasets.
- Exact compatibility scope with Yggdrasil Decision Forest models beyond what the description states.
What it is and what it does
TensorFlow Decision Forests is a library for training and deploying decision forest models—Random Forests, Gradient Boosted Trees, and similar ensemble methods—directly within TensorFlow. It handles classification, regression, and ranking problems, and is powered by Yggdrasil Decision Forests, a C++ backend that also supports JavaScript, CLI, and Go. Models trained in TensorFlow Decision Forests can be exported as TensorFlow SavedModels and are compatible with Yggdrasil models.
The library integrates with TensorFlow's Keras API, accepting pandas DataFrames or TensorFlow datasets as input. It provides model inspection, evaluation, and export capabilities. It runs on Linux and macOS (Windows via WSL). The package depends on TensorFlow, pandas, numpy, and several other utilities, making it suitable for teams already working within the TensorFlow ecosystem who want tree-based models alongside neural networks.
Use it for
- Train Random Forest or Gradient Boosted Tree models on tabular data using TensorFlow's Keras API and pandas DataFrames.
- Build classification or regression pipelines that combine decision forests with TensorFlow's preprocessing and deployment infrastructure.
- Export trained models as TensorFlow SavedModels for serving in production environments or converting to Yggdrasil format.
- Interpret model predictions through decision forest-specific analysis tools available in the library.
- Migrate or interoperate between TensorFlow Decision Forests and Yggdrasil Decision Forests across different platforms.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are already using TensorFlow and need tree-based models.
The library is actively maintained, has no known vulnerabilities, and integrates cleanly with TensorFlow's ecosystem. Medium install friction is acceptable for a compiled package. Not recommended for Windows users without WSL, or for projects not already committed to TensorFlow.
Install
tensorflow-decision-forests on PyPI
Before you install
Medium install friction due to compiled dependencies and platform-specific wheels. Active maintenance with recent commits and no known vulnerabilities. Requires TensorFlow and nine runtime dependencies including numpy, pandas, and ydf.
Requires TensorFlow installed; available on Linux and macOS only (Windows users must use WSL+Linux).
License in practice
Apache 2.0 permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and state significant changes.
Quickstart
pip install tensorflow_decision_forests
import tensorflow_decision_forests as tfdf
import pandas as pd
train_df = pd.read_csv("train.csv")
train_ds = tfdf.keras.pd_dataframe_to_tf_dataset(train_df, label="my_label")
model = tfdf.keras.RandomForestModel()
model.fit(train_ds)
Verify before relying
- Whether the nine runtime dependencies (numpy, pandas, tensorflow, six, absl_py, wheel, wurlitzer, tf_keras, ydf) are all required or some are optional.
- Performance characteristics compared to other decision forest libraries when handling large datasets.
- Exact compatibility scope with Yggdrasil Decision Forest models beyond what the description states.
Package facts
| License | Apache 2.0 permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 9 packagesnumpypandastensorflowsixabsl_pywheelwurlitzertf_kerasydf |
| Maintenance | Actively maintained 519 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 555,172 / month, #6,028 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: MathematicsTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules |
Evidence: tensorflow_decision_forests-1.12.0-cp310-cp310-macosx_12_0_arm64.whl; tensorflow_decision_forests-1.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; tensorflow_decision_forests-1.12.0-cp311-cp311-macosx_12_0_arm64.whl; tensorflow_decision_forests-1.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; tensorflow_decision_forests-1.12.0-cp312-cp312-macosx_12_0_arm64.whl; tensorflow_decision_forests-1.12.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; tensorflow_decision_forests-1.12.0-cp39-cp39-macosx_12_0_arm64.whl; tensorflow_decision_forests-1.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “random forest tensorflow”
- tensorflow-decision-forestsTrains and deploys decision forest models (Random Forests, Gradient…
- ydfYDF trains, evaluates, and interprets decision forest models (Random…
- dtreevizdtreeviz renders decision trees from scikit-learn, XGBoost, LightGBM,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also dtreeviz · ydf · treelite · py_trees · quantile-forest · treelite-runtime · forestci · xgboost-cpu · treeinterpreter · xgboost