starboost


Namestarboost JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/MaxHalford/starboost
SummaryA small machine learning library for doing gradient boosting
upload_time2018-12-09 10:51:38
maintainer
docs_urlNone
authorMax Halford
requires_python>=3.5.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            
<div align="center">
  <!-- Logo -->
  <img src="https://docs.google.com/drawings/d/e/2PACX-1vQKggEpm0PGgmkB7LymYmHdptSFEwYXC5yecuph_0gGmZ5fW-bTIfowcDLHVHxjgKQTHq8Y21H0d5LF/pub?w=1277&h=375" alt="logo" width=550px/>
</div>

<div align="center">
  <!-- Build status -->
  <a href="https://travis-ci.org/MaxHalford/starboost">
    <img src="https://img.shields.io/travis/MaxHalford/starboost/master.svg?style=flat-square" alt="build_status" />
  </a>
  <!-- Test coverage -->
  <a href="https://coveralls.io/github/MaxHalford/starboost?branch=master">
    <img src="https://coveralls.io/repos/github/MaxHalford/starboost/badge.svg?branch=master&style=flat-square" alt="test_coverage" />
  </a>
  <!-- License -->
  <a href="https://opensource.org/licenses/MIT">
    <img src="http://img.shields.io/:license-mit-ff69b4.svg?style=flat-square" alt="license"/>
  </a>
</div>

<br/>
<br/>

<div align="center">
Please check out the <a href="https://maxhalford.github.io/starboost/">website</a> if you're looking for the documentation!
</div>

**What is this?**

This is StarBoost, a Python library that implements gradient boosting. Gradient boosting is an efficient and popular machine learning algorithm used for supervised learning.

**Doesn't scikit-learn already do that?**

Indeed scikit-learn [implements gradient boosting](https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.GradientBoostingClassifier.html), but the only supported weak learner is a decision tree. In essence gradient boosting can be used with other weak learners than decision trees.

**What about XGBoost/LightGBM/CatBoost?**

The mentioned libraries are the state of the art of gradient boosting decision trees (GBRT). They implement a specific version of gradient boosting that is tailored to decision trees. StarBoost's purpose isn't to compete with them. Instead it's goal is to implement a generic gradient boosting algorithm that works with any weak learner.

A focus of StarBoost is to keep the code readable and commented, instead of obfuscating the algorithm under a pile of tangled code.

**What's a weak learner?**

A weak learner is any machine learning model that can learn from labeled data. It's called "weak" because it usually works better as part of an ensemble (such as gradient boosting). Examples are linear models, radial basis functions, decision trees, genetic programming, neural networks, etc. In theory you could even use gradient boosting as a weak learner.

**Is it compatible with scikit-learn?**

Yes, it is.

**How do I install it?**

Barring any weird Python setup, you simply have to run ``pip install starboost``.

**How do I use it?**

The following snippet shows a very basic usage of StarBoost. Please check out the [examples directory](examples/) for comprehensive examples.

```python
from sklearn import datasets
from sklearn import tree
import starboost as sb

X, y = datasets.load_boston(return_X_y=True)

model = sb.BoostingRegressor(
    base_estimator=tree.DecisionTreeRegressor(max_depth=3),
    n_estimators=30,
    learning_rate=0.1
)

model = model.fit(X, y)

y_pred = model.predict(X)
```

You can find the source code for running the benchmarks [here](benchmarks/).

**What are you planning on doing next?**

- Logging the progress
- Handling sample weights
- Implement more loss functions
- Make it faster
- Newton boosting (taking into account the information from the Hessian)
- Learning to rank

**By the way, why is it called "StarBoost"?**

As you might already know, in programming the star symbol `*` often refers to the concept of "everything". The idea is that StarBoost can be used with any weak learner, not just decision trees.


## License

The MIT License (MIT). Please see the [LICENSE file](LICENSE.md) for more information.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/MaxHalford/starboost",
    "name": "starboost",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.5.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Max Halford",
    "author_email": "maxhalford25@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/46/61/d915c3d3b505ed8c6a76507cae82269aa64ed6e164bcfc1fd7b6e4e2f682/starboost-0.0.2.tar.gz",
    "platform": "",
    "description": "\n<div align=\"center\">\n  <!-- Logo -->\n  <img src=\"https://docs.google.com/drawings/d/e/2PACX-1vQKggEpm0PGgmkB7LymYmHdptSFEwYXC5yecuph_0gGmZ5fW-bTIfowcDLHVHxjgKQTHq8Y21H0d5LF/pub?w=1277&h=375\" alt=\"logo\" width=550px/>\n</div>\n\n<div align=\"center\">\n  <!-- Build status -->\n  <a href=\"https://travis-ci.org/MaxHalford/starboost\">\n    <img src=\"https://img.shields.io/travis/MaxHalford/starboost/master.svg?style=flat-square\" alt=\"build_status\" />\n  </a>\n  <!-- Test coverage -->\n  <a href=\"https://coveralls.io/github/MaxHalford/starboost?branch=master\">\n    <img src=\"https://coveralls.io/repos/github/MaxHalford/starboost/badge.svg?branch=master&style=flat-square\" alt=\"test_coverage\" />\n  </a>\n  <!-- License -->\n  <a href=\"https://opensource.org/licenses/MIT\">\n    <img src=\"http://img.shields.io/:license-mit-ff69b4.svg?style=flat-square\" alt=\"license\"/>\n  </a>\n</div>\n\n<br/>\n<br/>\n\n<div align=\"center\">\nPlease check out the <a href=\"https://maxhalford.github.io/starboost/\">website</a> if you're looking for the documentation!\n</div>\n\n**What is this?**\n\nThis is StarBoost, a Python library that implements gradient boosting. Gradient boosting is an efficient and popular machine learning algorithm used for supervised learning.\n\n**Doesn't scikit-learn already do that?**\n\nIndeed scikit-learn [implements gradient boosting](https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.GradientBoostingClassifier.html), but the only supported weak learner is a decision tree. In essence gradient boosting can be used with other weak learners than decision trees.\n\n**What about XGBoost/LightGBM/CatBoost?**\n\nThe mentioned libraries are the state of the art of gradient boosting decision trees (GBRT). They implement a specific version of gradient boosting that is tailored to decision trees. StarBoost's purpose isn't to compete with them. Instead it's goal is to implement a generic gradient boosting algorithm that works with any weak learner.\n\nA focus of StarBoost is to keep the code readable and commented, instead of obfuscating the algorithm under a pile of tangled code.\n\n**What's a weak learner?**\n\nA weak learner is any machine learning model that can learn from labeled data. It's called \"weak\" because it usually works better as part of an ensemble (such as gradient boosting). Examples are linear models, radial basis functions, decision trees, genetic programming, neural networks, etc. In theory you could even use gradient boosting as a weak learner.\n\n**Is it compatible with scikit-learn?**\n\nYes, it is.\n\n**How do I install it?**\n\nBarring any weird Python setup, you simply have to run ``pip install starboost``.\n\n**How do I use it?**\n\nThe following snippet shows a very basic usage of StarBoost. Please check out the [examples directory](examples/) for comprehensive examples.\n\n```python\nfrom sklearn import datasets\nfrom sklearn import tree\nimport starboost as sb\n\nX, y = datasets.load_boston(return_X_y=True)\n\nmodel = sb.BoostingRegressor(\n    base_estimator=tree.DecisionTreeRegressor(max_depth=3),\n    n_estimators=30,\n    learning_rate=0.1\n)\n\nmodel = model.fit(X, y)\n\ny_pred = model.predict(X)\n```\n\nYou can find the source code for running the benchmarks [here](benchmarks/).\n\n**What are you planning on doing next?**\n\n- Logging the progress\n- Handling sample weights\n- Implement more loss functions\n- Make it faster\n- Newton boosting (taking into account the information from the Hessian)\n- Learning to rank\n\n**By the way, why is it called \"StarBoost\"?**\n\nAs you might already know, in programming the star symbol `*` often refers to the concept of \"everything\". The idea is that StarBoost can be used with any weak learner, not just decision trees.\n\n\n## License\n\nThe MIT License (MIT). Please see the [LICENSE file](LICENSE.md) for more information.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A small machine learning library for doing gradient boosting",
    "version": "0.0.2",
    "project_urls": {
        "Homepage": "https://github.com/MaxHalford/starboost"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cb4d3f696e4ff21a029b677e0ae3104f3385973679d17e3cef234e775da00617",
                "md5": "b2c02fed3ee4f7cd6cae02f04f4fc04e",
                "sha256": "e35691117640b8dcfbeb3edc1b2ea5eddecfc33148775a2c7c04273457088249"
            },
            "downloads": -1,
            "filename": "starboost-0.0.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b2c02fed3ee4f7cd6cae02f04f4fc04e",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.5.0",
            "size": 15719,
            "upload_time": "2018-12-09T10:51:36",
            "upload_time_iso_8601": "2018-12-09T10:51:36.717520Z",
            "url": "https://files.pythonhosted.org/packages/cb/4d/3f696e4ff21a029b677e0ae3104f3385973679d17e3cef234e775da00617/starboost-0.0.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4661d915c3d3b505ed8c6a76507cae82269aa64ed6e164bcfc1fd7b6e4e2f682",
                "md5": "e38d58acfd6a969cf82dd4f156d433fa",
                "sha256": "10d88630ecef8b4442a667ede4dcf6c3d383f4f0f55af0d909726ae63ae9fd3e"
            },
            "downloads": -1,
            "filename": "starboost-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "e38d58acfd6a969cf82dd4f156d433fa",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.5.0",
            "size": 12989,
            "upload_time": "2018-12-09T10:51:38",
            "upload_time_iso_8601": "2018-12-09T10:51:38.768664Z",
            "url": "https://files.pythonhosted.org/packages/46/61/d915c3d3b505ed8c6a76507cae82269aa64ed6e164bcfc1fd7b6e4e2f682/starboost-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2018-12-09 10:51:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MaxHalford",
    "github_project": "starboost",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "lcname": "starboost"
}
        
Elapsed time: 0.18274s