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.1-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.1-cp313-cp313-macosx_12_0_arm64.whl (8.2 MB view details)

Uploaded CPython 3.13macOS 12.0+ ARM64

ydf-0.16.1-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.1-cp312-cp312-macosx_12_0_arm64.whl (8.2 MB view details)

Uploaded CPython 3.12macOS 12.0+ ARM64

ydf-0.16.1-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.1-cp311-cp311-macosx_12_0_arm64.whl (8.2 MB view details)

Uploaded CPython 3.11macOS 12.0+ ARM64

ydf-0.16.1-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.1-cp310-cp310-macosx_12_0_arm64.whl (8.2 MB view details)

Uploaded CPython 3.10macOS 12.0+ ARM64

ydf-0.16.1-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.1-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.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ydf-0.16.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cc11a283be95dfa97112e16e13055a6640bdf84bc4517a4cf44c77c131723980
MD5 8b294e30221fb2029f8207f3ea54890f
BLAKE2b-256 e3add89f2ac54214db9c25d53480c3c2fa63adc817c8f99b4de754e1dc0257f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ydf-0.16.1-cp313-cp313-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 e09f1273f4d207926e5ef49f58b5dacfe4ba7459f709c425412543805678c1dd
MD5 e54d0a6ec5ebfa1427092addc043f391
BLAKE2b-256 0424a19c0f33063985db5bfa74b62480a346897a35842cbb312faf0c5cdda61d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ydf-0.16.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 05e6639d6d1d65bf5f5ba9f9c686001391d43f6e37ee693f0cabe9a2ab122e18
MD5 0d3177606f7f12e781590f03bf3c95bf
BLAKE2b-256 4941bc38018dc21152a3c2a088be7a517863073d934cfbac9931c0d40143f5f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ydf-0.16.1-cp312-cp312-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 839f723552a16ea9aeb16f093845c193dbed3eb4173ce208f19e048a51417e52
MD5 99a2586a9dd97ce4d7bef8a0b55a28d1
BLAKE2b-256 b048af820787a337389b77129f2ac5e124e40e07122da6b9b4662e5533f9dd7c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ydf-0.16.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1cbca1247fe2e26fe952499eb4d0b322cacf82b4c181848284cbef91f4cf5db4
MD5 24e620c2eafa58974f2ca4e4ea1c2d78
BLAKE2b-256 b6702daaac009f1c34292f5609512773275b2c714312169cd7999ef74df0566d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ydf-0.16.1-cp311-cp311-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 4acff9b2713b397cb69ec3c9f059c0d3b01244afb5704edcb68a5a2209ed7c5d
MD5 daf662dea079ab7239a6a28b39a99494
BLAKE2b-256 54a7815db6093427d3b9b06f8fea755adc4e43e1b786dc8b5c06f5a8ce35f083

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ydf-0.16.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d99910ea2a2ff9fd332763b7e9609d1c00662314cbe8066330d629efbc5488c8
MD5 57a19988231eeb0a86b54db2b5678c35
BLAKE2b-256 14d130995128a136c20a9920bebd4c7ee10286bdc8049d151e1ad783b31fa59b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ydf-0.16.1-cp310-cp310-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 a3f37401323f37ebe251d6ffbc7b9f6096d6ede9b1f8d30cb4e6babc0c7300b0
MD5 29ddfdd54778f6dcfc9405149a1c35e7
BLAKE2b-256 769161f3fb70c0254a94ea5f674d7ccf4ad58a4c442de10e2e544048e1a73b0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ydf-0.16.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 51346899096a2332224e3e6bc1eb25a42d35da20e2ecb939c0cd409ea6fbec12
MD5 0f12f8a7bd4e7c047710953231487dfb
BLAKE2b-256 7010b3048ed73b2825f1109888d0668c5d7bccb04d78387781406a08838e2a23

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ydf-0.16.1-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.1-cp39-cp39-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 f48f7b7d1c7cba4a19480ad77246254de2f69e647f2fb44ce983aef53c4e2735
MD5 557abd1a5194cebb737b40ee97099fac
BLAKE2b-256 2a896dfc16f04ddff8aaef976e7808d6f43a9d566ace229c88103635be434b3a

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