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.15.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (12.9 MB view details)

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

ydf-0.15.0-cp313-cp313-macosx_12_0_arm64.whl (8.0 MB view details)

Uploaded CPython 3.13macOS 12.0+ ARM64

ydf-0.15.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (12.9 MB view details)

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

ydf-0.15.0-cp312-cp312-macosx_12_0_arm64.whl (8.0 MB view details)

Uploaded CPython 3.12macOS 12.0+ ARM64

ydf-0.15.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (12.9 MB view details)

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

ydf-0.15.0-cp311-cp311-macosx_12_0_arm64.whl (8.0 MB view details)

Uploaded CPython 3.11macOS 12.0+ ARM64

ydf-0.15.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (12.9 MB view details)

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

ydf-0.15.0-cp310-cp310-macosx_12_0_arm64.whl (8.0 MB view details)

Uploaded CPython 3.10macOS 12.0+ ARM64

ydf-0.15.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (12.9 MB view details)

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

ydf-0.15.0-cp39-cp39-macosx_12_0_arm64.whl (8.0 MB view details)

Uploaded CPython 3.9macOS 12.0+ ARM64

File details

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

File metadata

File hashes

Hashes for ydf-0.15.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9b3b394b4d2eeac715ee4276d9d55df910d5ecc77952a09563fa4b16d59a210a
MD5 b2958b81cc11a77773541180f62add6a
BLAKE2b-256 3b5ce255cec725040d5df3ed5444ce686ac4aaa999319226f0dd1e2c4aef6db0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ydf-0.15.0-cp313-cp313-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 3ed058c0decb37bbba6c95cfaca5d42042b07770abfbba30492ea7fc55aa121a
MD5 e0cbc2aacb4e02e9447111c7436c34a2
BLAKE2b-256 fb0efd716df9bf6c2078498c1fb2084e9f63237bdf1729a7e25a031997cc274f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ydf-0.15.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3f873682cf613efdb636cf3abab037b6381fe14bbd243bfea58720938c08eb56
MD5 25b0175b86487e2f826f96b3e9d78ee7
BLAKE2b-256 712c5f079b37b3347e9f97648e0223e2577f869de4d6c30ac09769538b5ffa62

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ydf-0.15.0-cp312-cp312-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 c9657f3434e724b26afac848f99aa4abb81c08ca825e2e8c9a395b071568cd67
MD5 c5afdd7ac1b7d7084b5c1cee15651579
BLAKE2b-256 92ddbc6afbe34d47795095a66728893226b72d11fc16763870f8ae0a5f73562c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ydf-0.15.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a213889adc85f2c7b87a0feef2b3ed2d8e25ef028faaa1b4b0a1e8460e4e0995
MD5 12403111cb3a9c6fe7389f2009895c2b
BLAKE2b-256 6e8c8b7a12f8d5a716b560c0775f4beb34e239eff023e5f9be1f0c272b60aeea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ydf-0.15.0-cp311-cp311-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 3cf97d7181b4bb36ae5d9b4d9a5d5a25b49a6f5bea244a9a54659d45ce684a65
MD5 f35d6f71c2076b644fe19f615412b122
BLAKE2b-256 a04d6319918798cd2d23423eab8bd3055ae12e551a48b7568fe29283c54b980a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ydf-0.15.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8d43271d227b8fd157d15e290f58cc3c5291b921e4df69ae21fb0dffc2dcc4b3
MD5 8813abfeb523b59905a386cb68cbfaff
BLAKE2b-256 dd7926053e6f5e53cb8b3dc4460af1987eb85e03fa3b5cf6d41e00a9d3c1c898

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ydf-0.15.0-cp310-cp310-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 08318cf7094bfb49cedd70c9f1d6836335d636a8ccee768c408fd027ad00a8d2
MD5 cad8a2d99273bac62a3c9527cb42e692
BLAKE2b-256 7e329f75056770001ce10dd6e7d312cadd997b1eaabb97a85cdfd92154458a2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ydf-0.15.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c789291468323cda4f7addb87254e75c2de79683ee93da646ee66042ba6b4e61
MD5 0d144b9ca1a83b0e8952eb71592d2db0
BLAKE2b-256 0ba3729cecd1b25cbb224c2306818ebc9599a2e5c87dc98bfbed9ac124f34bfa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ydf-0.15.0-cp39-cp39-macosx_12_0_arm64.whl
  • Upload date:
  • Size: 8.0 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.15.0-cp39-cp39-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 a1a25d755a1a56f2769e03dc0d4b538bc59c780bfb6bf3990e88366ef571d03b
MD5 53e25d960b3d83b41761e61b69582a24
BLAKE2b-256 efdbe41eeab5a15638bdc27a56d4759d07058bee640ae1d749ae1bf9b0439801

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