ngboost
Library for probabilistic predictions via gradient boosting.
What it is and what it does
NGBoost is a gradient boosting library that outputs full probability distributions for each prediction rather than single point estimates. Built on scikit-learn, it implements the Natural Gradient Boosting algorithm, allowing you to quantify prediction uncertainty and choose among different distributions and scoring rules to match your problem. The library depends on numpy, scipy, scikit-learn, matplotlib, tqdm, lifelines, and sympy.
You use it like a standard estimator: fit on training data, then call predict() for point estimates or pred_dist() to get the full predictive distribution at each test point. This makes it useful when you need not just a prediction but also a measure of confidence or uncertainty around that prediction, such as in risk-sensitive applications or when building prediction intervals.
Use it for:
- Build regression models that output prediction intervals and uncertainty estimates alongside point forecasts.
- Quantify model confidence in high-stakes domains like medical or financial prediction where uncertainty matters.
- Compare different probability distributions and scoring rules for the same dataset to find the best fit.
- Extend NGBoost with custom distributions or scoring rules for domain-specific probabilistic prediction tasks.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
NGBoost implements Natural Gradient Boosting for probabilistic prediction, built on scikit-learn, enabling regression models that output full probability distributions rather than point estimates.
Yes. NGBoost is actively maintained, has low install friction, carries a permissive Apache 2.0 license, and fills a clear niche: probabilistic prediction with uncertainty quantification. Install it if you need prediction intervals, distribution outputs, or uncertainty estimates alongside your regression predictions.
Install
ngboost on PyPI
pip
pip install ngboostuv
uv add ngboostpoetry
poetry add ngboostInstalling ngboost
Before you install
Low friction: pure Python wheel, active maintenance (last commit 2026-07-01), and supports current Python versions (3.9–3.13). Dependencies are all standard scientific stack (scikit-learn, numpy, scipy, matplotlib, tqdm, lifelines, sympy).
License in practice
Apache License 2.0 is permissive; you can use, modify, and distribute ngboost freely in commercial and private projects with minimal restrictions.
Quickstart
pip install ngboost
from ngboost import NGBRegressor
ngb = NGBRegressor().fit(X_train, Y_train)
Y_preds = ngb.predict(X_test)
Y_dists = ngb.pred_dist(X_test)
Verify before relying
- Whether NGBoost supports classification tasks in addition to regression.
- Performance characteristics and scalability limits on large datasets.
- Availability and ease of adding custom distributions or scoring rules beyond built-in options.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<3.15,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — scikit-learn, numpy, scipy, tqdm, lifelines, sympy, matplotlib |
| Maintenance | actively maintained — 49 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 179,315/month — #10,175 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ngboost-0.5.11-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
xgboost-cpuXGBoost CPU-only gradient boosting library for…
permissive · top 15,000 on PyPI
catboostCatBoost is a gradient boosting library that…
permissive · top 5,000 on PyPI
tensorflow-probabilityTensorFlow Probability provides probabilistic…
permissive · top 5,000 on PyPI
lightgbmLightGBM is a gradient boosting framework for…
unclear · top 1,000 on PyPI
xgboostXGBoost is a gradient boosting library that…
permissive · top 1,000 on PyPI
quantile-forestQuantile regression forests for estimating…
permissive · top 15,000 on PyPI
MAPIEMAPIE computes prediction intervals and…
permissive · top 15,000 on PyPI
forestciComputes confidence intervals and variance…
permissive · top 15,000 on PyPI
properscoringProperscoring provides strictly proper scoring…
permissive · top 15,000 on PyPI
cartoboostCartoBoost is a Rust-backed gradient boosting…
permissive · top 15,000 on PyPI