{"library":"ngboost","title":"NGBoost","description":"NGBoost is a library for probabilistic prediction via gradient boosting that estimates full probability distributions rather than point predictions. Current version is 0.5.10, supporting Python 3.9–3.14. It uses natural gradient boosting to learn parameters of a parametric distribution. Release cadence is periodic, with recent versions adding distribution support (Weibull, HalfNormal, Beta, etc.), numpy2 compatibility, and sklearn compatibility. Maintained by the Stanford ML Group.","language":"python","status":"active","last_verified":"Mon Apr 27","install":{"commands":["pip install ngboost"],"cli":null},"imports":["from ngboost import NGBRegressor","from ngboost import NGBClassifier","from ngboost.distns import Normal","from ngboost.scores import LogScore"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import numpy as np\nfrom ngboost import NGBRegressor\nfrom ngboost.distns import Normal\nfrom ngboost.scores import LogScore\n\n# Generate sample data\nnp.random.seed(42)\nX = np.random.randn(100, 1)\ny = X[:, 0] + 0.1*np.random.randn(100)\n\n# Train probabilistic model\nngb = NGBRegressor(Dist=Normal, Score=LogScore, n_estimators=100, learning_rate=0.01, verbose=False)\nngb.fit(X, y)\n\n# Predict: mean and variance (or scale) of Normal distribution\ny_preds = ngb.predict(X)\n# Use ngb.pred_dist(X) to get distribution object","lang":"python","description":"Basic usage of NGBoost for regression with a Normal distribution and LogScore.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}