OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Ngboost

NGBoost is a Python library that implements natural gradient boosting for probabilistic prediction, including regression. Built on Scikit-learn, it supports modular choices of scoring rule, probability distribution and base learner.

Independent OpenViST project profile, based on linked sources.

Ngboost — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use NGBoost when a prediction task calls for a predictive distribution rather than only a point estimate, or when comparing modular choices in a probabilistic boosting model.

Who it is for

  • Python practitioners developing probabilistic regression models.
  • Researchers comparing scoring rules or modeling choices for probabilistic predictions.
  • Machine-learning developers exploring custom distributions or scoring rules.

Documented uses

  • Build regression models that produce predictive distributions.
  • Compare or tune scoring rules for probabilistic predictions.
  • Develop probabilistic models using custom distributions or scoring rules.
Before you choose

Requirements & limits

  • It is a Python library, not a hosted prediction service.
  • Its modular design exposes choices of scoring rule, probability distribution and base learner.
  • The listed platforms are Linux, macOS and Windows.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Fit a probabilistic regression model and evaluate predictions

Train an NGBoost regressor on California housing data, produce predictions and predictive distributions, and calculate test MSE and negative log likelihood.

Before you start

  • NGBoost and Scikit-learn installed using pip or conda-forge.
  • California housing data available through Scikit-learn's dataset loader.

Steps

  1. Install NGBoost with the command below or conda install -c conda-forge ngboost.

    Documented command
    pip install --upgrade ngboost
  2. Load fetch_california_housing() and split its data and targets with train_test_split(X, Y, test_size=0.2).

  3. Fit NGBRegressor() on the training data, then call predict(X_test) and pred_dist(X_test).

  4. Calculate test MSE with mean_squared_error(Y_preds, Y_test) and test NLL with -Y_dists.logpdf(Y_test).mean().

Expected outcome

A fitted probabilistic regressor provides point predictions and predictive distributions, with test MSE and NLL calculations.

Guide limitations

  • The example uses California housing data, not Boston housing, despite the README's introductory label.
  • No train/test random seed or expected metric values are specified.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
11 October 2026
Original website title
GitHub - stanfordmlgroup/ngboost: Natural Gradient Boosting for Probabilistic Prediction · GitHub · Official homepage title · retained in its source language