<p align="center">
<img src="documentation/image/logo.png" />
</p>
**TensorFlow Decision Forests** (**TF-DF**) is a library to train, run and
interpret [decision forest](https://ydf.readthedocs.io/en/latest/intro_df.html)
models (e.g., Random Forests, Gradient Boosted Trees) in TensorFlow. TF-DF
supports classification, regression and ranking.
**TF-DF** is powered by
[Yggdrasil Decision Forest](https://github.com/google/yggdrasil-decision-forests)
(**YDF**, a library to train and use decision forests in C++, JavaScript, CLI,
and Go. TF-DF models are
[compatible](https://ydf.readthedocs.io/en/latest/convert_model.html#convert-a-a-tensorflow-decision-forests-model-to-a-yggdrasil-model)
with YDF' models, and vice versa.
Tensorflow Decision Forests is available on Linux and Mac. Windows users can use
the library through WSL+Linux.
## Usage example
A minimal end-to-end run looks as follows:
```python
import tensorflow_decision_forests as tfdf
import pandas as pd
# Load the dataset in a Pandas dataframe.
train_df = pd.read_csv("project/train.csv")
test_df = pd.read_csv("project/test.csv")
# Convert the dataset into a TensorFlow dataset.
train_ds = tfdf.keras.pd_dataframe_to_tf_dataset(train_df, label="my_label")
test_ds = tfdf.keras.pd_dataframe_to_tf_dataset(test_df, label="my_label")
# Train the model
model = tfdf.keras.RandomForestModel()
model.fit(train_ds)
# Look at the model.
model.summary()
# Evaluate the model.
model.evaluate(test_ds)
# Export to a TensorFlow SavedModel.
# Note: the model is compatible with Yggdrasil Decision Forests.
model.save("project/model")
```
## Google I/O Presentation
<div align="center">
<a href="https://youtu.be/5qgk9QJ4rdQ">
<img src="https://img.youtube.com/vi/5qgk9QJ4rdQ/0.jpg"></img>
</a>
</div>
## Documentation & Resources
The following resources are available:
- [TF-DF on TensorFlow.org](https://tensorflow.org/decision_forests) (API
Reference, Guides and Tutorials)
- [Tutorials](https://www.tensorflow.org/decision_forests/tutorials) (on
tensorflow.org)
- [YDF documentation](https://ydf.readthedocs.io) (also applicable to TF-DF)
- [Issue tracker](https://github.com/tensorflow/decision-forests/issues)
- [Known issues](documentation/known_issues.md)
- [Changelog](CHANGELOG.md)
- [More examples](documentation/more_examples.md)
## Installation
To install TensorFlow Decision Forests, run:
```shell
pip3 install tensorflow_decision_forests --upgrade
```
See the [installation](documentation/installation.md) page for more details,
troubleshooting and alternative installation solutions.
## Contributing
Contributions to TensorFlow Decision Forests and Yggdrasil Decision Forests are
welcome. If you want to contribute, make sure to review the
[developer manual](documentation/developer_manual.md) and
[contribution guidelines](CONTRIBUTING.md).
## Citation
If you us Tensorflow Decision Forests in a scientific publication, please cite
the following paper:
[Yggdrasil Decision Forests: A Fast and Extensible Decision Forests Library](https://doi.org/10.1145/3580305.3599933).
**Bibtex**
```
@inproceedings{GBBSP23,
author = {Mathieu Guillame{-}Bert and
Sebastian Bruch and
Richard Stotz and
Jan Pfeifer},
title = {Yggdrasil Decision Forests: {A} Fast and Extensible Decision Forests
Library},
booktitle = {Proceedings of the 29th {ACM} {SIGKDD} Conference on Knowledge Discovery
and Data Mining, {KDD} 2023, Long Beach, CA, USA, August 6-10, 2023},
pages = {4068--4077},
year = {2023},
url = {https://doi.org/10.1145/3580305.3599933},
doi = {10.1145/3580305.3599933},
}
```
**Raw**
Yggdrasil Decision Forests: A Fast and Extensible Decision Forests Library,
Guillame-Bert et al., KDD 2023: 4068-4077. doi:10.1145/3580305.3599933
## Contact
You can contact the core development team at
[decision-forests-contact@google.com](mailto:decision-forests-contact@google.com).
## Credits
TensorFlow Decision Forests was developed by:
- Mathieu Guillame-Bert (gbm AT google DOT com)
- Jan Pfeifer (janpf AT google DOT com)
- Richard Stotz (richardstotz AT google DOT com)
- Sebastian Bruch (sebastian AT bruch DOT io)
- Arvind Srinivasan (arvnd AT google DOT com)
## License
[Apache License 2.0](LICENSE)
Raw data
{
"_id": null,
"home_page": "https://github.com/tensorflow/decision-forests",
"name": "tensorflow-decision-forests",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "tensorflow tensor machine learning decision forests random forest gradient boosted decision trees",
"author": "Google Inc.",
"author_email": "decision-forests-contact@google.com",
"download_url": null,
"platform": null,
"description": "<p align=\"center\">\n<img src=\"documentation/image/logo.png\" />\n</p>\n\n**TensorFlow Decision Forests** (**TF-DF**) is a library to train, run and\ninterpret [decision forest](https://ydf.readthedocs.io/en/latest/intro_df.html)\nmodels (e.g., Random Forests, Gradient Boosted Trees) in TensorFlow. TF-DF\nsupports classification, regression and ranking.\n\n**TF-DF** is powered by\n[Yggdrasil Decision Forest](https://github.com/google/yggdrasil-decision-forests)\n(**YDF**, a library to train and use decision forests in C++, JavaScript, CLI,\nand Go. TF-DF models are\n[compatible](https://ydf.readthedocs.io/en/latest/convert_model.html#convert-a-a-tensorflow-decision-forests-model-to-a-yggdrasil-model)\nwith YDF' models, and vice versa.\n\nTensorflow Decision Forests is available on Linux and Mac. Windows users can use\nthe library through WSL+Linux.\n\n## Usage example\n\nA minimal end-to-end run looks as follows:\n\n```python\nimport tensorflow_decision_forests as tfdf\nimport pandas as pd\n\n# Load the dataset in a Pandas dataframe.\ntrain_df = pd.read_csv(\"project/train.csv\")\ntest_df = pd.read_csv(\"project/test.csv\")\n\n# Convert the dataset into a TensorFlow dataset.\ntrain_ds = tfdf.keras.pd_dataframe_to_tf_dataset(train_df, label=\"my_label\")\ntest_ds = tfdf.keras.pd_dataframe_to_tf_dataset(test_df, label=\"my_label\")\n\n# Train the model\nmodel = tfdf.keras.RandomForestModel()\nmodel.fit(train_ds)\n\n# Look at the model.\nmodel.summary()\n\n# Evaluate the model.\nmodel.evaluate(test_ds)\n\n# Export to a TensorFlow SavedModel.\n# Note: the model is compatible with Yggdrasil Decision Forests.\nmodel.save(\"project/model\")\n```\n\n## Google I/O Presentation\n\n<div align=\"center\">\n <a href=\"https://youtu.be/5qgk9QJ4rdQ\">\n <img src=\"https://img.youtube.com/vi/5qgk9QJ4rdQ/0.jpg\"></img>\n </a>\n</div>\n\n## Documentation & Resources\n\nThe following resources are available:\n\n- [TF-DF on TensorFlow.org](https://tensorflow.org/decision_forests) (API\n Reference, Guides and Tutorials)\n- [Tutorials](https://www.tensorflow.org/decision_forests/tutorials) (on\n tensorflow.org)\n- [YDF documentation](https://ydf.readthedocs.io) (also applicable to TF-DF)\n- [Issue tracker](https://github.com/tensorflow/decision-forests/issues)\n- [Known issues](documentation/known_issues.md)\n- [Changelog](CHANGELOG.md)\n- [More examples](documentation/more_examples.md)\n\n## Installation\n\nTo install TensorFlow Decision Forests, run:\n\n```shell\npip3 install tensorflow_decision_forests --upgrade\n```\n\nSee the [installation](documentation/installation.md) page for more details,\ntroubleshooting and alternative installation solutions.\n\n## Contributing\n\nContributions to TensorFlow Decision Forests and Yggdrasil Decision Forests are\nwelcome. If you want to contribute, make sure to review the\n[developer manual](documentation/developer_manual.md) and\n[contribution guidelines](CONTRIBUTING.md).\n\n## Citation\n\nIf you us Tensorflow 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\nTensorFlow Decision Forests was developed by:\n\n- Mathieu Guillame-Bert (gbm AT google DOT com)\n- Jan Pfeifer (janpf AT google DOT com)\n- Richard Stotz (richardstotz AT google DOT com)\n- Sebastian Bruch (sebastian AT bruch DOT io)\n- Arvind Srinivasan (arvnd AT google DOT com)\n\n## License\n\n[Apache License 2.0](LICENSE)\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "Collection of training and inference decision forest algorithms.",
"version": "1.11.0",
"project_urls": {
"Bug Tracker": "https://github.com/tensorflow/decision-forests/issues",
"Homepage": "https://github.com/tensorflow/decision-forests"
},
"split_keywords": [
"tensorflow",
"tensor",
"machine",
"learning",
"decision",
"forests",
"random",
"forest",
"gradient",
"boosted",
"decision",
"trees"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ce7eb9bbeab7cd50f10537303801b6cb5e1b3801697d27d4ea7d2f8bf02f25ad",
"md5": "0c37564590888feeda4e670eefd4d2dd",
"sha256": "27a900dd17d56210316dac19196ae5d77dc793723d168ab271412c6d65f43d0c"
},
"downloads": -1,
"filename": "tensorflow_decision_forests-1.11.0-cp310-cp310-macosx_12_0_arm64.whl",
"has_sig": false,
"md5_digest": "0c37564590888feeda4e670eefd4d2dd",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": ">=3.9",
"size": 12023029,
"upload_time": "2024-10-28T13:46:35",
"upload_time_iso_8601": "2024-10-28T13:46:35.762477Z",
"url": "https://files.pythonhosted.org/packages/ce/7e/b9bbeab7cd50f10537303801b6cb5e1b3801697d27d4ea7d2f8bf02f25ad/tensorflow_decision_forests-1.11.0-cp310-cp310-macosx_12_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f393cc25bc8d2afb90255270877d42d5ec75f515e124a402642330b34643c480",
"md5": "4f7c41104e38040f123ae22c09dc3695",
"sha256": "e5c28e07cf761816bc9f8afc8a24252672a31bf5737f721dc19245faa7dcb92e"
},
"downloads": -1,
"filename": "tensorflow_decision_forests-1.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "4f7c41104e38040f123ae22c09dc3695",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": ">=3.9",
"size": 15891273,
"upload_time": "2024-10-28T13:43:25",
"upload_time_iso_8601": "2024-10-28T13:43:25.379925Z",
"url": "https://files.pythonhosted.org/packages/f3/93/cc25bc8d2afb90255270877d42d5ec75f515e124a402642330b34643c480/tensorflow_decision_forests-1.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0dc9c0b54c26fb053a855481e1fde1352a63cfec1e50e61249b86e840cfa7ef9",
"md5": "d787930d8c33a9fb04b9ac6c3a9dd5a0",
"sha256": "758071891bb77ac67edfdb10e3f76f3ac19a0cad34ded2174077612b24515c4c"
},
"downloads": -1,
"filename": "tensorflow_decision_forests-1.11.0-cp311-cp311-macosx_12_0_arm64.whl",
"has_sig": false,
"md5_digest": "d787930d8c33a9fb04b9ac6c3a9dd5a0",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.9",
"size": 12023028,
"upload_time": "2024-10-28T13:46:39",
"upload_time_iso_8601": "2024-10-28T13:46:39.263316Z",
"url": "https://files.pythonhosted.org/packages/0d/c9/c0b54c26fb053a855481e1fde1352a63cfec1e50e61249b86e840cfa7ef9/tensorflow_decision_forests-1.11.0-cp311-cp311-macosx_12_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7c44e9680debc8bdbdb0ebd7c3682be4f21f6681cbf8546f3b89a24b785a9ecf",
"md5": "92c395a6ce0c5bdc687a255c4fb9cb96",
"sha256": "c3a793b9528d251cc907d365e35e7a70f645f9a94df63c982733ff1d9361011c"
},
"downloads": -1,
"filename": "tensorflow_decision_forests-1.11.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "92c395a6ce0c5bdc687a255c4fb9cb96",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.9",
"size": 15891272,
"upload_time": "2024-10-28T13:43:29",
"upload_time_iso_8601": "2024-10-28T13:43:29.168423Z",
"url": "https://files.pythonhosted.org/packages/7c/44/e9680debc8bdbdb0ebd7c3682be4f21f6681cbf8546f3b89a24b785a9ecf/tensorflow_decision_forests-1.11.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "528c5a187fb7870553dda716c5245473c9956f9f0c7888a6ae0a19519df76dbe",
"md5": "45ae0f9de56a0e4fd32559869168bd02",
"sha256": "7cab9b82658ffba0acdd84382d2b7a8efb86a8bb3cc1409b2bf64da172672a8d"
},
"downloads": -1,
"filename": "tensorflow_decision_forests-1.11.0-cp39-cp39-macosx_12_0_arm64.whl",
"has_sig": false,
"md5_digest": "45ae0f9de56a0e4fd32559869168bd02",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 12023025,
"upload_time": "2024-10-28T13:46:42",
"upload_time_iso_8601": "2024-10-28T13:46:42.567339Z",
"url": "https://files.pythonhosted.org/packages/52/8c/5a187fb7870553dda716c5245473c9956f9f0c7888a6ae0a19519df76dbe/tensorflow_decision_forests-1.11.0-cp39-cp39-macosx_12_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4355152daa9ed50103394bbbc639f09d2dc853666d89967c8f8b93859a12dbb3",
"md5": "4ab2f76c3e5679532b73cc505c5a1ab9",
"sha256": "1cc5061480bea2e370265a8649792fd96d417e7ad34fdd81a2920550ff77104a"
},
"downloads": -1,
"filename": "tensorflow_decision_forests-1.11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "4ab2f76c3e5679532b73cc505c5a1ab9",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 15891271,
"upload_time": "2024-10-28T13:43:31",
"upload_time_iso_8601": "2024-10-28T13:43:31.755107Z",
"url": "https://files.pythonhosted.org/packages/43/55/152daa9ed50103394bbbc639f09d2dc853666d89967c8f8b93859a12dbb3/tensorflow_decision_forests-1.11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-28 13:46:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tensorflow",
"github_project": "decision-forests",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "tensorflow-decision-forests"
}