{"id":28185,"library":"skpro","title":"skpro - Probabilistic Regression & Distribution Framework","description":"A unified framework for tabular probabilistic regression, time-to-event prediction, and probability distributions in Python. Provides sktime-compatible interfaces for distribution estimation, survival analysis, and conformal prediction. Current version: 2.12.0. Release cadence: ~3-4 major/minor releases per year.","status":"active","version":"2.12.0","language":"python","source_language":"en","source_url":"https://github.com/sktime/skpro","tags":["probabilistic-regression","survival-analysis","probability-distributions","conformal-prediction","sktime"],"install":[{"cmd":"pip install skpro","lang":"bash","label":"Install skpro"}],"dependencies":[{"reason":"Optional: used for time series integration, provides base estimators compatible with skpro.","package":"sktime","optional":true},{"reason":"Required: used for base regression models and utilities.","package":"scikit-learn","optional":false},{"reason":"Required: numerical operations and array handling.","package":"numpy","optional":false}],"imports":[{"note":"ProbabilisticRegressor is in the skpro.regression submodule, not top-level.","wrong":"from skpro import ProbabilisticRegressor","symbol":"ProbabilisticRegressor","correct":"from skpro.regression import ProbabilisticRegressor"},{"note":"Distributions should be imported from skpro.distributions directly; the internal submodules may change.","wrong":"from skpro.distributions.tweedie import TweedieDistribution","symbol":"TweedieDistribution","correct":"from skpro.distributions import TweedieDistribution"},{"note":"GaussianNaiveRegressor is located in the gaussian submodule under regression.","wrong":"from skpro.regression import GaussianNaiveRegressor","symbol":"GaussianNaiveRegressor","correct":"from skpro.regression.gaussian import GaussianNaiveRegressor"}],"quickstart":{"code":"from sklearn.datasets import make_regression\nfrom sklearn.model_selection import train_test_split\nfrom skpro.regression import ProbabilisticRegressor\nfrom skpro.metrics import CRPS\n\nX, y = make_regression(n_samples=100, n_features=4, random_state=42)\nX_train, X_test, y_train, y_test = train_test_split(X, y, random_state=42)\n\nreg = ProbabilisticRegressor()\nreg.fit(X_train, y_train)\n\n# Predict distribution\ny_pred_dist = reg.predict_dist(X_test)\n\n# Evaluate with CRPS\ncrps = CRPS()\nscore = crps(y_test, y_pred_dist)\nprint(f\"CRPS: {score}\")","lang":"python","description":"Fit a probabilistic regressor and evaluate using continuous ranked probability score (CRPS)."},"warnings":[{"fix":"Use Python >=3.10.","message":"Python 3.8 dropped in v2.8.0, Python 3.9 dropped in v2.10.0. Upgrade Python if using older versions.","severity":"breaking","affected_versions":">=2.8.0"},{"fix":"Use from skpro.distributions import NormalDistribution.","message":"Direct import of distribution classes from skpro.distributions submodules (e.g., skpro.distributions.normal) is deprecated; import from skpro.distributions instead.","severity":"deprecated","affected_versions":">=2.9.0"},{"fix":"Call reg.predict_mean(X_test) for point predictions, or reg.predict_interval(X_test) for intervals.","message":"Predict method returns a distribution object, not point predictions. Use .predict_mean() or .predict_interval() for point/interval estimates.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use: from skpro.distributions import NormalDistribution","cause":"Importing from an internal submodule that has been refactored.","error":"ModuleNotFoundError: No module named 'skpro.distributions.normal'"},{"fix":"Use reg.predict_dist(X) for distribution, reg.predict_mean(X) for mean, or reg.predict_interval(X) for intervals.","cause":"Using .predict for distribution output instead of dedicated methods.","error":"AttributeError: 'ProbabilisticRegressor' object has no attribute 'predict'"},{"fix":"Use X.reshape(-1, 1) if single feature.","cause":"Passing a 1D array as features; skpro expects 2D input (reshaped).","error":"ValueError: Expected 2D array, got 1D array instead"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}