ngboost-0.5.9
توضیحات
Library for probabilistic predictions via gradient boosting.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | ngboost-0.5.9 |
| نام | ngboost |
| نسخه کتابخانه | 0.5.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Stanford ML Group |
| ایمیل نویسنده | avati@cs.stanford.edu |
| آدرس صفحه اصلی | https://github.com/stanfordmlgroup/ngboost |
| آدرس اینترنتی | https://pypi.org/project/ngboost/ |
| مجوز | Apache-2.0 |
# NGBoost: Natural Gradient Boosting for Probabilistic Prediction
<h4 align="center">

[](https://github.com/stanfordmlgroup/ngboost/graphs/contributors)
[](https://opensource.org/licenses/Apache-2.0)
[](https://github.com/psf/black)
[](https://pypi.org/project/ngboost)
[](https://pypistats.org/packages/ngboost)
</h4>
ngboost is a Python library that implements Natural Gradient Boosting, as described in ["NGBoost: Natural Gradient Boosting for Probabilistic Prediction"](https://stanfordmlgroup.github.io/projects/ngboost/). It is built on top of [Scikit-Learn](https://scikit-learn.org/stable/), and is designed to be scalable and modular with respect to choice of proper scoring rule, distribution, and base learner. A didactic introduction to the methodology underlying NGBoost is available in this [slide deck](https://docs.google.com/presentation/d/1Tn23Su0ygR6z11jy3xVNiLGv0ggiUQue/edit?usp=share_link&ouid=102290675300480810195&rtpof=true&sd=true).
## Installation
```sh
via pip
pip install --upgrade ngboost
via conda-forge
conda install -c conda-forge ngboost
```
## Usage
Probabilistic regression example on the Boston housing dataset:
```python
from ngboost import NGBRegressor
from sklearn.datasets import fetch_california_housing
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error
# Load California housing dataset
cal = fetch_california_housing()
X, Y = cal.data, cal.target
X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=0.2)
ngb = NGBRegressor().fit(X_train, Y_train)
Y_preds = ngb.predict(X_test)
Y_dists = ngb.pred_dist(X_test)
# test Mean Squared Error
test_MSE = mean_squared_error(Y_preds, Y_test)
print('Test MSE', test_MSE)
# test Negative Log Likelihood
test_NLL = -Y_dists.logpdf(Y_test).mean()
print('Test NLL', test_NLL)
```
Details on available distributions, scoring rules, learners, tuning, and model interpretation are available in our [user guide](https://stanfordmlgroup.github.io/ngboost/intro.html), which also includes numerous usage examples and information on how to add new distributions or scores to NGBoost.
## License
[Apache License 2.0](https://github.com/stanfordmlgroup/ngboost/blob/master/LICENSE).
## Reference
Tony Duan, Anand Avati, Daisy Yi Ding, Khanh K. Thai, Sanjay Basu, Andrew Y. Ng, Alejandro Schuler. 2019.
NGBoost: Natural Gradient Boosting for Probabilistic Prediction.
[arXiv](https://arxiv.org/abs/1910.03225)
نیازمندی
| مقدار | نام |
|---|---|
| - | scikit-learn<2.0,>=1.6 |
| ython_versio | numpy>=1.21.2; |
| ython_versio | numpy>=2.1.0; |
| ython_versio | scipy>=1.7.2; |
| ython_versio | scipy>=1.14.1; |
| - | tqdm>=4.3 |
| - | lifelines>=0.25 |
| - | sympy>=1.12 |
| ython_versio | matplotlib<3.10,>=3.0; |
| ython_versio | matplotlib>=3.10.0; |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| <3.15,>=3.9 | Python |
نحوه نصب
نصب پکیج whl ngboost-0.5.9:
pip install ngboost-0.5.9.whl
نصب پکیج tar.gz ngboost-0.5.9:
pip install ngboost-0.5.9.tar.gz