{"id":13638721,"url":"https://github.com/google/yggdrasil-decision-forests","last_synced_at":"2026-01-12T09:43:01.380Z","repository":{"id":37405186,"uuid":"360444739","full_name":"google/yggdrasil-decision-forests","owner":"google","description":"A library to train, evaluate, interpret, and productionize decision forest models such as Random Forest and Gradient Boosted Decision Trees. ","archived":false,"fork":false,"pushed_at":"2025-12-09T15:21:28.000Z","size":48453,"stargazers_count":623,"open_issues_count":51,"forks_count":69,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-12-11T23:57:01.630Z","etag":null,"topics":["cart","cli","cpp","decision-forest","decision-trees","distributed-computing","go","gradient-boosting","interpretability","javascript","machine-learning","ml","pypi","python","random-forest","tensorflow"],"latest_commit_sha":null,"homepage":"https://ydf.readthedocs.io/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/google.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-04-22T08:21:18.000Z","updated_at":"2025-12-10T12:48:46.000Z","dependencies_parsed_at":"2023-09-27T16:33:17.198Z","dependency_job_id":"edcb8952-99ad-426f-be7d-61a51bea9056","html_url":"https://github.com/google/yggdrasil-decision-forests","commit_stats":{"total_commits":1009,"total_committers":24,"mean_commits":"42.041666666666664","dds":0.4112983151635282,"last_synced_commit":"f59812eff430e9b903c3f71088d5cd0efb5c2545"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"purl":"pkg:github/google/yggdrasil-decision-forests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fyggdrasil-decision-forests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fyggdrasil-decision-forests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fyggdrasil-decision-forests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fyggdrasil-decision-forests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google","download_url":"https://codeload.github.com/google/yggdrasil-decision-forests/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fyggdrasil-decision-forests/sbom","scorecard":{"id":112686,"data":{"date":"2025-08-11","repo":{"name":"github.com/google/yggdrasil-decision-forests","commit":"45a7965420f23b8293507c218f4f034cd3f1e237"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 10 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.11.0 not signed: https://api.github.com/repos/google/yggdrasil-decision-forests/releases/205296100","Warn: release artifact v1.11.0 does not have provenance: https://api.github.com/repos/google/yggdrasil-decision-forests/releases/205296100"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/google/.github/SECURITY.md:1","Info: Found linked content: github.com/google/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/google/.github/SECURITY.md:1","Info: Found text in security policy: github.com/google/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: pipCommand not pinned by hash: tools/build_binary_release.sh:58","Warn: pipCommand not pinned by hash: tools/test_bazel.sh:81","Warn: npmCommand not pinned by hash: yggdrasil_decision_forests/port/javascript/tools/build_zipped_library.sh:39","Warn: pipCommand not pinned by hash: yggdrasil_decision_forests/port/python/tools/build_test_linux.sh:44","Warn: pipCommand not pinned by hash: yggdrasil_decision_forests/port/python/tools/build_test_linux.sh:45","Warn: pipCommand not pinned by hash: yggdrasil_decision_forests/port/python/tools/package_linux.sh:44","Warn: pipCommand not pinned by hash: yggdrasil_decision_forests/port/python/tools/package_linux.sh:45","Warn: pipCommand not pinned by hash: yggdrasil_decision_forests/port/python/tools/package_linux.sh:46","Warn: pipCommand not pinned by hash: yggdrasil_decision_forests/port/python/tools/package_linux.sh:47","Warn: pipCommand not pinned by hash: yggdrasil_decision_forests/port/python/tools/package_linux.sh:48","Warn: pipCommand not pinned by hash: yggdrasil_decision_forests/port/python/tools/release_macos.sh:29","Info:   1 out of   1 containerImage dependencies pinned","Info:   0 out of  10 pipCommand dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":0,"reason":"40 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6","Warn: Project is vulnerable to: PYSEC-2020-73","Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: PYSEC-2021-100 / GHSA-8h2j-cgx8-6xv7","Warn: Project is vulnerable to: PYSEC-2024-38","Warn: Project is vulnerable to: PYSEC-2021-47 / GHSA-5jqp-qgf6-3pvh","Warn: Project is vulnerable to: GHSA-mr82-8j83-vxmv","Warn: Project is vulnerable to: PYSEC-2014-14 / GHSA-652x-xj99-gmcc","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2014-13 / GHSA-cfj3-7x9c-4p3h","Warn: Project is vulnerable to: PYSEC-2018-28 / GHSA-x84v-xcm2-53pg","Warn: Project is vulnerable to: PYSEC-2020-107 / GHSA-jjw5-xxj6-pcv5","Warn: Project is vulnerable to: PYSEC-2024-110 / GHSA-jw8x-6495-233v","Warn: Project is vulnerable to: PYSEC-2020-108","Warn: Project is vulnerable to: PYSEC-2017-74","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: PYSEC-2023-207 / GHSA-gwvm-45gx-3cf8","Warn: Project is vulnerable to: PYSEC-2019-133 / GHSA-mh33-7rrq-662w","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2019-132 / GHSA-r64q-w8jr-g9qp","Warn: Project is vulnerable to: PYSEC-2023-192 / GHSA-v845-jxx5-vc9f","Warn: Project is vulnerable to: PYSEC-2020-148 / GHSA-wqvq-5m8c-6g24","Warn: Project is vulnerable to: PYSEC-2018-32 / GHSA-www2-v7xj-xrc6","Warn: Project is vulnerable to: PYSEC-2021-108","Warn: Project is vulnerable to: PYSEC-2018-34 / GHSA-2fc2-6r4j-p65h","Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2018-33 / GHSA-cw6w-4rcx-xphc","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2017-1 / GHSA-frgw-fgh6-9g52","Warn: Project is vulnerable to: PYSEC-2022-48 / GHSA-77rm-9x9h-xj3g","Warn: Project is vulnerable to: GHSA-8gq9-2x98-w8hf","Warn: Project is vulnerable to: GHSA-8qvm-5x2c-j2w7","Warn: Project is vulnerable to: PYSEC-2017-65 / GHSA-jwvw-v7c5-m82h"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-15T13:47:10.005Z","repository_id":37405186,"created_at":"2025-08-15T13:47:10.005Z","updated_at":"2025-08-15T13:47:10.005Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27764166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-16T02:00:10.477Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cart","cli","cpp","decision-forest","decision-trees","distributed-computing","go","gradient-boosting","interpretability","javascript","machine-learning","ml","pypi","python","random-forest","tensorflow"],"created_at":"2024-08-02T01:00:52.447Z","updated_at":"2026-01-12T09:43:01.359Z","avatar_url":"https://github.com/google.png","language":"C++","funding_links":[],"categories":["Computation and Communication Optimisation","C++"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"documentation/public/docs/image/logo_v2.png\"  /\u003e\n\u003c/p\u003e\n\n[![PyPI](https://img.shields.io/pypi/v/ydf.svg?style=flat-square)](https://pypi.org/project/ydf/)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg?style=flat-square)](https://opensource.org/licenses/Apache-2.0)\n[![Static](https://img.shields.io/static/v1?label=docs\u0026message=stable\u0026style=flat-square)](https://ydf.readthedocs.io/)\n[![Static](https://img.shields.io/static/v1?label=docs\u0026message=dev\u0026style=flat-square)](https://ydf.readthedocs.io/en/latest/)\n[![PyPI Downloads](https://img.shields.io/pypi/dm/ydf?style=flat-square)](https://pepy.tech/project/ydf)\n\n**YDF** (Yggdrasil Decision Forests) is a library to train, evaluate, interpret,\nand serve Random Forest, Gradient Boosted Decision Trees, CART and Isolation\nforest models.\n\nSee the [documentation](https://ydf.readthedocs.org/) for more information on\nYDF.\n\n## Installation\n\nTo install YDF from [PyPI](https://pypi.org/project/ydf/), run:\n\n```shell\npip install ydf -U\n```\n\n## Usage example\n\n[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google/yggdrasil-decision-forests/blob/main/documentation/public/docs/tutorial/usage_example.ipynb)\n\n```python\nimport ydf\nimport pandas as pd\n\n# Load dataset with Pandas\nds_path = \"https://raw.githubusercontent.com/google/yggdrasil-decision-forests/main/yggdrasil_decision_forests/test_data/dataset/\"\ntrain_ds = pd.read_csv(ds_path + \"adult_train.csv\")\ntest_ds = pd.read_csv(ds_path + \"adult_test.csv\")\n\n# Train a Gradient Boosted Trees model\nmodel = ydf.GradientBoostedTreesLearner(label=\"income\").train(train_ds)\n\n# Look at a model (input features, training logs, structure, etc.)\nmodel.describe()\n\n# Evaluate a model (e.g. roc, accuracy, confusion matrix, confidence intervals)\nmodel.evaluate(test_ds)\n\n# Generate predictions\nmodel.predict(test_ds)\n\n# Analyse a model (e.g. partial dependence plot, variable importance)\nmodel.analyze(test_ds)\n\n# Benchmark the inference speed of a model\nmodel.benchmark(test_ds)\n\n# Save the model\nmodel.save(\"/tmp/my_model\")\n```\n\nExample with the C++ API.\n\n```c++\nauto dataset_path = \"csv:train.csv\";\n\n// List columns in training dataset\nDataSpecification spec;\nCreateDataSpec(dataset_path, false, {}, \u0026spec);\n\n// Create a training configuration\nTrainingConfig train_config;\ntrain_config.set_learner(\"RANDOM_FOREST\");\ntrain_config.set_task(Task::CLASSIFICATION);\ntrain_config.set_label(\"my_label\");\n\n// Train model\nstd::unique_ptr\u003cAbstractLearner\u003e learner;\nGetLearner(train_config, \u0026learner);\nauto model = learner-\u003eTrain(dataset_path, spec);\n\n// Export model\nSaveModel(\"my_model\", model.get());\n```\n\n(based on [examples/beginner.cc](examples/beginner.cc))\n\n## Next steps\n\nCheck the\n[Getting Started tutorial 🧭](https://ydf.readthedocs.io/en/stable/tutorial/getting_started/).\n\n## Citation\n\nIf you us Yggdrasil Decision Forests in a scientific publication, please cite\nthe following paper:\n[Yggdrasil Decision Forests: A Fast and Extensible Decision Forests Library](https://doi.org/10.1145/3580305.3599933).\n\n**Bibtex**\n\n```\n@inproceedings{GBBSP23,\n  author       = {Mathieu Guillame{-}Bert and\n                  Sebastian Bruch and\n                  Richard Stotz and\n                  Jan Pfeifer},\n  title        = {Yggdrasil Decision Forests: {A} Fast and Extensible Decision Forests\n                  Library},\n  booktitle    = {Proceedings of the 29th {ACM} {SIGKDD} Conference on Knowledge Discovery\n                  and Data Mining, {KDD} 2023, Long Beach, CA, USA, August 6-10, 2023},\n  pages        = {4068--4077},\n  year         = {2023},\n  url          = {https://doi.org/10.1145/3580305.3599933},\n  doi          = {10.1145/3580305.3599933},\n}\n```\n\n**Raw**\n\nYggdrasil Decision Forests: A Fast and Extensible Decision Forests Library,\nGuillame-Bert et al., KDD 2023: 4068-4077. doi:10.1145/3580305.3599933\n\n## Contact\n\nYou can contact the core development team at\n[decision-forests-contact@google.com](mailto:decision-forests-contact@google.com).\n\n## Credits\n\nYggdrasil Decision Forests and TensorFlow Decision Forests are developed by:\n\n-   Mathieu Guillame-Bert (gbm AT google DOT com)\n-   Richard Stotz (richardstotz AT google DOT com)\n-   Jan Pfeifer (janpf AT google DOT com)\n-   Sebastian Bruch (sebastian AT bruch DOT io)\n-   Arvind Srinivasan (arvnd AT google DOT com)\n\n## Contributing\n\nContributions to TensorFlow Decision Forests and Yggdrasil Decision Forests are\nwelcome. If you want to contribute, check the\n[contribution guidelines](CONTRIBUTING.md).\n\n## License\n\n[Apache License 2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fyggdrasil-decision-forests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle%2Fyggdrasil-decision-forests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fyggdrasil-decision-forests/lists"}