tensorflow-decision-forests


Nametensorflow-decision-forests JSON
Version 1.9.0 PyPI version JSON
download
home_pagehttps://github.com/tensorflow/decision-forests
SummaryCollection of training and inference decision forest algorithms.
upload_time2024-03-14 10:28:49
maintainer
docs_urlNone
authorGoogle Inc.
requires_python>=3.9
licenseApache 2.0
keywords tensorflow tensor machine learning decision forests random forest gradient boosted decision trees
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <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": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "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": "",
    "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.9.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": "3550b01498bf3c2f237a43b86a42283feb186aef2b8247101437477d2a7cabfb",
                "md5": "ac2836c35a9d5c1baacdfc17bed4be31",
                "sha256": "bbc76e92c693114037e5380fcc11201d260e7290f30a56daf23306e0103dd9bb"
            },
            "downloads": -1,
            "filename": "tensorflow_decision_forests-1.9.0-cp310-cp310-macosx_10_15_x86_64.whl",
            "has_sig": false,
            "md5_digest": "ac2836c35a9d5c1baacdfc17bed4be31",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.9",
            "size": 12582884,
            "upload_time": "2024-03-14T10:28:49",
            "upload_time_iso_8601": "2024-03-14T10:28:49.381796Z",
            "url": "https://files.pythonhosted.org/packages/35/50/b01498bf3c2f237a43b86a42283feb186aef2b8247101437477d2a7cabfb/tensorflow_decision_forests-1.9.0-cp310-cp310-macosx_10_15_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ebccf771e2b71ac4dec8a47287f9a552401a4e0e2a03f41a710c4560b2ba2f61",
                "md5": "281686846dcb1b31102adee458e632e8",
                "sha256": "c5fe3b8fca3579f9342995a85f1c66b8c3524d002ff6cab92d90b557a79715ef"
            },
            "downloads": -1,
            "filename": "tensorflow_decision_forests-1.9.0-cp310-cp310-macosx_12_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "281686846dcb1b31102adee458e632e8",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.9",
            "size": 11621809,
            "upload_time": "2024-03-14T10:28:53",
            "upload_time_iso_8601": "2024-03-14T10:28:53.322325Z",
            "url": "https://files.pythonhosted.org/packages/eb/cc/f771e2b71ac4dec8a47287f9a552401a4e0e2a03f41a710c4560b2ba2f61/tensorflow_decision_forests-1.9.0-cp310-cp310-macosx_12_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "68559bcf89e2530e665cec4dc8a6558b5644fef26f10248bf54a30ed9f9cc0fc",
                "md5": "7faab3fbdb0b361e37e1314f5edf11c5",
                "sha256": "7868b1ad4054b14d3f45635fb7eab73495a25900ea4cf12fecc140c3c2004909"
            },
            "downloads": -1,
            "filename": "tensorflow_decision_forests-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "7faab3fbdb0b361e37e1314f5edf11c5",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.9",
            "size": 15509357,
            "upload_time": "2024-03-14T10:28:57",
            "upload_time_iso_8601": "2024-03-14T10:28:57.045913Z",
            "url": "https://files.pythonhosted.org/packages/68/55/9bcf89e2530e665cec4dc8a6558b5644fef26f10248bf54a30ed9f9cc0fc/tensorflow_decision_forests-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6e68ecfe92f30e74ec385bd3dabf23b61e623cc14b9a63add037d93afa5d449f",
                "md5": "b488c8c4a1922599ef113d986fd2d472",
                "sha256": "688d522d4de7f8e868f068df383d6cfe7f898cba60811f325f470c784ce365e2"
            },
            "downloads": -1,
            "filename": "tensorflow_decision_forests-1.9.0-cp311-cp311-macosx_10_15_x86_64.whl",
            "has_sig": false,
            "md5_digest": "b488c8c4a1922599ef113d986fd2d472",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.9",
            "size": 12582883,
            "upload_time": "2024-03-14T10:28:59",
            "upload_time_iso_8601": "2024-03-14T10:28:59.885003Z",
            "url": "https://files.pythonhosted.org/packages/6e/68/ecfe92f30e74ec385bd3dabf23b61e623cc14b9a63add037d93afa5d449f/tensorflow_decision_forests-1.9.0-cp311-cp311-macosx_10_15_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e1b11edf4b2126349a158050b4734b860fa7a776f60c54665dc48eb5e329945e",
                "md5": "180a96817f8ee497af0ae4dadbac386d",
                "sha256": "baafff33647e87565b8e93bff92f3bace89e4efb5cfd2aceff1a05de52ab3d16"
            },
            "downloads": -1,
            "filename": "tensorflow_decision_forests-1.9.0-cp311-cp311-macosx_12_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "180a96817f8ee497af0ae4dadbac386d",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.9",
            "size": 11621810,
            "upload_time": "2024-03-14T10:29:02",
            "upload_time_iso_8601": "2024-03-14T10:29:02.838290Z",
            "url": "https://files.pythonhosted.org/packages/e1/b1/1edf4b2126349a158050b4734b860fa7a776f60c54665dc48eb5e329945e/tensorflow_decision_forests-1.9.0-cp311-cp311-macosx_12_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6078a83ef523f65b69854ff73e507608782cd56200ca57e30787860e7e0ffd1b",
                "md5": "d473a61a4baab2015446864bbead2d09",
                "sha256": "f24a830e9d0c3283579ce8406009580ab9295371a014001511963be7c19f8b07"
            },
            "downloads": -1,
            "filename": "tensorflow_decision_forests-1.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "d473a61a4baab2015446864bbead2d09",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.9",
            "size": 15509357,
            "upload_time": "2024-03-14T10:29:05",
            "upload_time_iso_8601": "2024-03-14T10:29:05.736867Z",
            "url": "https://files.pythonhosted.org/packages/60/78/a83ef523f65b69854ff73e507608782cd56200ca57e30787860e7e0ffd1b/tensorflow_decision_forests-1.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "46bbdf59564319fb28801b7e1659c7ddcfc07c15dc3e2fd6ed0764326f5df2b3",
                "md5": "16a3bc41e7253044c7a94028fe5f97a9",
                "sha256": "bf85a2d292bcce59d31518f102baa6b8c42d40e73dd5b667d4df83564b2b01dd"
            },
            "downloads": -1,
            "filename": "tensorflow_decision_forests-1.9.0-cp39-cp39-macosx_10_15_x86_64.whl",
            "has_sig": false,
            "md5_digest": "16a3bc41e7253044c7a94028fe5f97a9",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 12582883,
            "upload_time": "2024-03-14T10:29:09",
            "upload_time_iso_8601": "2024-03-14T10:29:09.485879Z",
            "url": "https://files.pythonhosted.org/packages/46/bb/df59564319fb28801b7e1659c7ddcfc07c15dc3e2fd6ed0764326f5df2b3/tensorflow_decision_forests-1.9.0-cp39-cp39-macosx_10_15_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7960cf315165d4b6e022a0b6605919fcccc9f42b55fdaf5a11eafad37de4a00c",
                "md5": "159e921cdd6e58d4448d3e4384638668",
                "sha256": "942d0501ed95ef2964d1fdb4196b34b75794cc19276770c169de8d4638efa350"
            },
            "downloads": -1,
            "filename": "tensorflow_decision_forests-1.9.0-cp39-cp39-macosx_12_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "159e921cdd6e58d4448d3e4384638668",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 11621805,
            "upload_time": "2024-03-14T10:29:12",
            "upload_time_iso_8601": "2024-03-14T10:29:12.336625Z",
            "url": "https://files.pythonhosted.org/packages/79/60/cf315165d4b6e022a0b6605919fcccc9f42b55fdaf5a11eafad37de4a00c/tensorflow_decision_forests-1.9.0-cp39-cp39-macosx_12_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "93605f146ad387baa2b2e1c5d3bac99c8a9b98a000f141279743ce3b5f28da22",
                "md5": "cb393db38d5db611a84fa04ade38d9c8",
                "sha256": "54d9bb6040fb7698860a23f38ec8a5ce4c2d162f7a54ce82b1b13cf353bac31a"
            },
            "downloads": -1,
            "filename": "tensorflow_decision_forests-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "cb393db38d5db611a84fa04ade38d9c8",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 15509357,
            "upload_time": "2024-03-14T10:29:16",
            "upload_time_iso_8601": "2024-03-14T10:29:16.043132Z",
            "url": "https://files.pythonhosted.org/packages/93/60/5f146ad387baa2b2e1c5d3bac99c8a9b98a000f141279743ce3b5f28da22/tensorflow_decision_forests-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-14 10:28:49",
    "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"
}
        
Elapsed time: 0.22123s