Metadata-Version: 2.1
Name: ydf
Author: Mathieu Guillame-Bert, Richard Stotz, Jan Pfeifer
Author-email: decision-forests-contact@google.com
Home-page: https://github.com/google/yggdrasil-decision-forests
License: Apache 2.0
Description-Content-Type: text/markdown
Summary: 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.
Keywords: machine learning,decision forests,random forest,gradient boosted decision trees,CART,isolation forests,classification,regression,ranking,uplift,boosting
Project-URL: Documentation, https://ydf.readthedocs.io/
Project-URL: Source, https://github.com/google/yggdrasil-decision-forests.git
Project-URL: Tracker, https://github.com/google/yggdrasil-decision-forests/issues
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Requires-Dist: numpy
Requires-Dist: absl_py
Requires-Dist: protobuf>=6.31.1,<8.0.0
Provides-Extra: pandas
Requires-Dist: pandas; extra == 'pandas'
Provides-Extra: tensorflow
Requires-Dist: ydf-tf; extra == 'tensorflow'
Version: 0.17.0

# YDF - Yggdrasil Decision Forests for Python

**YDF** is a library for training, serving, and interpreting decision forest
models. It acts as a lightweight, efficient wrapper around the C++
[Yggdrasil Decision Forests](https://github.com/google/yggdrasil-decision-forests)
library.

It provides fast access to core methods along with advanced features for model
import/export, evaluation, and inspection.

YDF is the official successor to
[TensorFlow Decision Forests (TF-DF)](https://github.com/tensorflow/decision-forests)
and is recommended for new projects due to its superior performance and
features.

## Installation

Install YDF from PyPI:

```bash
pip install ydf
```

For detailed build instructions, see [INSTALLATION.md](INSTALLATION.md).

## Usage Example

```python
import ydf
import pandas as pd

# Load dataset
ds_path = "https://raw.githubusercontent.com/google/yggdrasil-decision-forests/main/yggdrasil_decision_forests/test_data/dataset"
train_ds = pd.read_csv(f"{ds_path}/adult_train.csv")
test_ds = pd.read_csv(f"{ds_path}/adult_test.csv")

# Train a Gradient Boosted Trees model
model = ydf.GradientBoostedTreesLearner(label="income").train(train_ds)

# Evaluate the model
print(model.evaluate(test_ds))

# Save the model
model.save("my_model")

# Load the model
loaded_model = ydf.load_model("my_model")
```

## Documentation

For more information, visit the
[YDF Documentation](https://ydf.readthedocs.io/).

Frequently asked questions are available in the
[FAQ](https://ydf.readthedocs.io/en/latest/faq/).


