Metadata-Version: 2.4
Name: ydf
Version: 0.16.0
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.
Home-page: https://github.com/google/yggdrasil-decision-forests
Author: Mathieu Guillame-Bert, Richard Stotz, Jan Pfeifer
Author-email: decision-forests-contact@google.com
License: Apache 2.0
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
Keywords: machine learning decision forests random forest gradient boosted decision trees CART isolation forests classification regression  ranking uplift boosting
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.9
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 :: 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
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: absl_py
Requires-Dist: protobuf<7.0.0,>=5.29.1
Provides-Extra: pandas
Requires-Dist: pandas; extra == "pandas"
Provides-Extra: tensorflow
Requires-Dist: ydf-tf; extra == "tensorflow"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 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/).

