Skip to main content

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.

Project description

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 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) and is recommended for new projects due to its superior performance and features.

Installation

Install YDF from PyPI:

pip install ydf

For detailed build instructions, see INSTALLATION.md.

Usage Example

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.

Frequently asked questions are available in the FAQ.

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

If you're not sure about the file name format, learn more about wheel file names.

ydf-0.16.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

ydf-0.16.0-cp313-cp313-macosx_12_0_arm64.whl (8.2 MB view details)

Uploaded CPython 3.13macOS 12.0+ ARM64

ydf-0.16.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

ydf-0.16.0-cp312-cp312-macosx_12_0_arm64.whl (8.2 MB view details)

Uploaded CPython 3.12macOS 12.0+ ARM64

ydf-0.16.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

ydf-0.16.0-cp311-cp311-macosx_12_0_arm64.whl (8.2 MB view details)

Uploaded CPython 3.11macOS 12.0+ ARM64

ydf-0.16.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

ydf-0.16.0-cp310-cp310-macosx_12_0_arm64.whl (8.2 MB view details)

Uploaded CPython 3.10macOS 12.0+ ARM64

ydf-0.16.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

ydf-0.16.0-cp39-cp39-macosx_12_0_arm64.whl (8.2 MB view details)

Uploaded CPython 3.9macOS 12.0+ ARM64

File details

Details for the file ydf-0.16.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ydf-0.16.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d23dac7b6c78ee974b0c42cfb78c6f1657c0baaba2cb3062dae81efcf2526fc9
MD5 45a7c7cb37b7da4ef7cf54612a1ac3f6
BLAKE2b-256 28f57c0815e572144330706a7aa807e5a9f53aa618be86204b05242478237abb

See more details on using hashes here.

File details

Details for the file ydf-0.16.0-cp313-cp313-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for ydf-0.16.0-cp313-cp313-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 0a329de7ab69597dc7e3b2c5ab6544c85efea8b37b2f42b2137aae5c72947573
MD5 a61663f95328886950f1e2e3f1c39e60
BLAKE2b-256 273fe39a676287bb51405d69e78fe5dec834ba571b33e2b298b7d9191be7a351

See more details on using hashes here.

File details

Details for the file ydf-0.16.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ydf-0.16.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cd9e79e797653af86fea7088fd23cb5ae2bb9cb3d618d00f35cee392d54e85d2
MD5 e1656ff68590c5d4480105aad1568c09
BLAKE2b-256 7cb3ee7cba9e0e8585db40e6e840625d2d31984b8c7f6656c2c8944f98e4127c

See more details on using hashes here.

File details

Details for the file ydf-0.16.0-cp312-cp312-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for ydf-0.16.0-cp312-cp312-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 9fe964fd28c53e5e76a43a6310dce446e24c06b9bd2889067c4f5ef4f7f7691e
MD5 44d03b102fb569ae7a65a15163836197
BLAKE2b-256 9ca3a75750a71b1f8fca225dffaa1dfa0e58b0295eabecd5569a477a8b689c4f

See more details on using hashes here.

File details

Details for the file ydf-0.16.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ydf-0.16.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bcde164ce4443705be556df59fc5cb6800e34feee000fcc38e53c4015dcece50
MD5 26e1a6f5b9fc1dc7c7662d5d43a76886
BLAKE2b-256 c69233d30485af23be651ce3744cdf541676e1a526ed7ea2e481c55d36a3d25c

See more details on using hashes here.

File details

Details for the file ydf-0.16.0-cp311-cp311-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for ydf-0.16.0-cp311-cp311-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 4391bf01018184c7bc0a5041760fa128afefb88b596ebfc411472e2f201533de
MD5 c4602e4d005e226926c4f5dea0d41879
BLAKE2b-256 8b8a2bbe8e5b79e42b4b9e505726e6b46b09073aa90cb18c2d5d2ec5408cbdce

See more details on using hashes here.

File details

Details for the file ydf-0.16.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ydf-0.16.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 47ed23b371a3f47cd360fc1ef9ac4b8eebe54d9ee6aafe3883cb58a57f0bba58
MD5 905e7ef552629145abf9bca5962d7acc
BLAKE2b-256 505dbba1059b24c25f12863db436d7a7afdb985db1a57e98b00ac91dcacd302b

See more details on using hashes here.

File details

Details for the file ydf-0.16.0-cp310-cp310-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for ydf-0.16.0-cp310-cp310-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 5b20b3c1aa65c33c1992b6741e57b9b3ec53abed3af51168671da8a215344b8b
MD5 b2d16fc2dd6344458d6b17f558f920e4
BLAKE2b-256 7525198a5e21ba4fac75532d967059b787055d81c090c79db997fd1d75fe6685

See more details on using hashes here.

File details

Details for the file ydf-0.16.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ydf-0.16.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8c66f91d42ce8b4f9153d9124ecc2ce25ce7414371c9aa139d28dc8745a810f4
MD5 282170189bb221f189ba8c4e365308f1
BLAKE2b-256 2b574c7a98de4821cdec33e55dea136a02e503c274f978cf75fbd22cd40cca60

See more details on using hashes here.

File details

Details for the file ydf-0.16.0-cp39-cp39-macosx_12_0_arm64.whl.

File metadata

  • Download URL: ydf-0.16.0-cp39-cp39-macosx_12_0_arm64.whl
  • Upload date:
  • Size: 8.2 MB
  • Tags: CPython 3.9, macOS 12.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for ydf-0.16.0-cp39-cp39-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 c74392283e95d8ff14566eb403e531c045658993bdd97e2dae5b572c51181a9c
MD5 4c78b2b671717f43d61da38fefb7b7d5
BLAKE2b-256 b118ff530f511cd7b617798c5b71086370f2c09f360f135cbbe89ac855fe9c1c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page