--- id: ydf version: "0.16.1" license: Apache 2.0 license_treatment: permissive maintenance: active --- # ydf — YDF (short for Yggdrasil Decision Forests) is a library for training, serving, evaluating and analyzing decision forest models such as Random Forest and Gradient Boosted Trees. License: permissive · Maintenance: active · Downloads: 439.8K/mo ## What it is and what it does YDF is a Python library for building and working with decision forest models—Random Forests, Gradient Boosted Trees, and related ensemble methods. It wraps the C++ Yggdrasil Decision Forests engine to provide fast training, evaluation, and model inspection. The library is designed as the successor to TensorFlow Decision Forests and emphasizes performance and feature completeness for new projects. Typical workflows involve loading data, instantiating a learner (e.g., GradientBoostedTreesLearner), training on a dataset, evaluating on test data, and saving or loading models. The package depends on numpy, absl_py, and protobuf for numerical computation and serialization. It supports Python 3.9 through 3.13 and is actively maintained. Use it for: - Train Gradient Boosted Trees or Random Forest classifiers for tabular data classification tasks. - Evaluate and compare decision forest models on test datasets to measure performance. - Export trained models for deployment or import pre-trained models for inference. - Inspect and interpret decision forest models to understand feature importance and decision paths. - Build ranking or uplift models using decision forest learners for specialized prediction tasks. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. YDF trains, evaluates, and interprets decision forest models (Random Forests, Gradient Boosted Trees, and others) through a Python wrapper around the C++ Yggdrasil Decision Forests library. Yes, if you need to train or deploy decision forest models in Python and work with tabular data. The active maintenance, permissive Apache 2.0 license, and lack of known vulnerabilities make it a solid choice. Install friction is moderate due to compiled wheels, but prebuilt binaries cover common platforms and Python versions (3.9–3.13). Not suitable if you require platforms outside macOS ARM64 or Linux x86_64. ## Install pip install ydf uv add ydf poetry add ydf ## Installing ydf Before you install: Medium install friction due to compiled wheels; prebuilt binaries available for Python 3.9–3.13 on macOS (ARM64) and Linux (x86_64). Active maintenance with recent releases; last commit 2026-08-14. License in practice: Apache 2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects. Quickstart: pip install ydf import ydf model = ydf.GradientBoostedTreesLearner(label="target").train(train_ds) model.save("my_model") Requires Python 3.9 or later; prebuilt wheels available only for Python 3.9–3.13 on macOS ARM64 and Linux x86_64. Verify before relying: - Whether YDF's performance advantage over TensorFlow Decision Forests is quantified in benchmarks. - Support status and timeline for platforms beyond macOS ARM64 and Linux x86_64. - Whether all Yggdrasil Decision Forests features are exposed through the Python API. ## Package facts - License: Apache 2.0 (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 439.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags decision forest machine learning, gradient boosted trees python, random forest training, tree ensemble models, model evaluation and inspection, decision tree classification, model import export, decision-forests, gradient-boosting, tabular-ml [View on SkillFed](https://skillfed.io/packages/ydf) · [View on PyPI](https://pypi.org/project/ydf/)