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
Port of Yggdrasil / TensorFlow Decision Forests for Python
The Python port of Yggdrasil Decision is a light-weight wrapper around Yggdrasil Decision Forests. It allows direct, fast access to YDF's methods and it also offers advanced import / export, evaluation and inspection methods. While the package is called YDF, the wrapping code is sometimes lovingly called PYDF.
It is not a replacement for its sister project Tensorflow Decision Forests (TF-DF). Instead, it complements TF-DF for use cases that cannot be solved through the Keras API.
Installation
To install YDF, in Python, simply grab the package from pip:
pip install ydf
For build instructions, see INSTALLATION.md.
Usage Example
import ydf
import pandas as pd
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")
model = ydf.GradientBoostedTreesLearner(label="income").train(train_ds)
print(model.evaluate(test_ds))
model.save("my_model")
loaded_model = ydf.load_model("my_model")
Frequently Asked Questions
- Is it PYDF or YDF? The name of the library is simply ydf, and so is the name of the corresponding Pip package. Internally, the team sometimes uses the name PYDF because it fits so well.
- What is the status of PYDF? PYDF is currently in Alpha development. Most parts already work well (training, evaluation, predicting, export), some new features are yet to come. The API surface is mostly stable but may still change without notice.
- Where is the documentation for PYDF? The documentation is available on https://ydf.readthedocs.org.
- How should I pronounce PYDF? The preferred pronunciation is "Py-dee-eff" / ˈpaɪˈdiˈɛf (IPA)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for ydf-0.7.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3766db53530576ff606a8bb0c9253be54397889929ae0ef0e2128e0f4924285 |
|
MD5 | 59506bab8f4cbc6faa2044a5ccda35dc |
|
BLAKE2b-256 | ee903f847be215137979cc1a3cfbb9b27de3e24648c23fb64845f01c55a06c49 |
Hashes for ydf-0.7.0-cp312-cp312-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f840f4d07e0226adf078676c56717be913e746607688596ba67c4b122dac5226 |
|
MD5 | 2d8ead15c25a1a3b259751baff529dc2 |
|
BLAKE2b-256 | 467eb4ee1d42deb837c5dbcb76e07371e851b7e6387abc1a13eb5a59d85eaaea |
Hashes for ydf-0.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4b73442eab912e270b6693ef09e901af405b9b49e4fc37c1079db92fb8c19ec |
|
MD5 | 50dd4fd3f5d13d39c096a32a55e903a1 |
|
BLAKE2b-256 | fb08ce56ccee3f18c99459e6c396b27fe8ac758712f2b59671c7624660da49f5 |
Hashes for ydf-0.7.0-cp311-cp311-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3ce5b9a41721959ea9871e005e7471b3e26b0163a9ab9fe3d4982e16de15604 |
|
MD5 | 5bbe82d7a6315dfdc88bf69dfd8bfe69 |
|
BLAKE2b-256 | 4c26c7f3276efdc977a8f9ff8bebbdc6a81afef0baddd73833046cf279fa7dcb |
Hashes for ydf-0.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e5de113e479b9458f559bb5887efe1baa2accc45bc8b0263ec469e06a4e740c |
|
MD5 | ed62aac3c202e35c4bda9d69ce7f7f47 |
|
BLAKE2b-256 | 720c6d55fa88692e60f3ce33d420b7bd74b77d8de6f1daa974c7a2076b282025 |
Hashes for ydf-0.7.0-cp310-cp310-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ea427080526233cab62b07f41f3c808dc5dc5bad81d11afd8c9609abaad3f09 |
|
MD5 | fce275ac7cb436bef2a3fe8a96e9d79b |
|
BLAKE2b-256 | 3b732d4f0a2a1f3b87a32afdd105f9ab56e2746b9318124debc9d63995edd5af |
Hashes for ydf-0.7.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 831bcfcc057fbced49d3d1f85ca6fb9167a296e08a53f3be478f145d8b15a1a7 |
|
MD5 | 583d060f386a73377b680ce4359fc9ba |
|
BLAKE2b-256 | a3161ea17542b20b7904a4880fe0333f15c842dc63d6e333fcc171ce1ddf08de |
Hashes for ydf-0.7.0-cp39-cp39-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3a4b9db4101711424709eaae8b21b5af220b4e5fbb7644f5c50ef188fe9bc45 |
|
MD5 | c431867f636fff1cb16be641d1426107 |
|
BLAKE2b-256 | 850d380d4a03649c9c2c00a6c6fb075450d6590c25793e56aed8780b7062340e |
Hashes for ydf-0.7.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e6e2dd64c4b0f498658a8506fe4cb46eb17a072fd9b3b1900e60040359a5167 |
|
MD5 | d49b26bedd53395fe1664dc599f1e150 |
|
BLAKE2b-256 | 517bc8c75a9567bd92d42030b36a5df34376de874d330819eff8533bd0de6969 |
Hashes for ydf-0.7.0-cp38-cp38-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b645dedd313451b88e2de2da9ce8be358c2af33c939bfa918e12d24f9c0e9e7d |
|
MD5 | 0e7c86318a52bc23d758ee9473016c4a |
|
BLAKE2b-256 | b89ba5d0256977b99c4040c06274cee51665a1d767cd35f340d6e663a72dc0ea |