Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A unified framework for tabular probabilistic regression, time-to-event prediction, and probability distributions in python

License

NotificationsYou must be signed in to change notification settings

sktime/skpro

🚀Version 2.9.0 out now!Read the release notes here..

skpro is a library for supervised probabilistic prediction in python.It providesscikit-learn-like,scikit-base compatible interfaces to:

  • tabularsupervised regressors for probabilistic prediction - interval, quantile and distribution predictions
  • tabularprobabilistic time-to-event and survival prediction - instance-individual survival distributions
  • metrics to evaluate probabilistic predictions, e.g., pinball loss, empirical coverage, CRPS, survival losses
  • reductions to turnscikit-learn regressors into probabilisticskpro regressors, such as bootstrap or conformal
  • buildingpipelines and composite models, including tuning via probabilistic performance metrics
  • symbolicprobability distributions with value domain ofpandas.DataFrame-s andpandas-like interface
Overview
Open SourceBSD 3-clause
TutorialsBinder!youtube
Community!discord!slack
CI/CDgithub-actions!codecovreadthedocsplatform
Code!pypi!conda!python-versions!black
DownloadsPyPI - DownloadsPyPI - DownloadsDownloads
CitationDOI

📚 Documentation

Documentation
TutorialsNew to skpro? Here's everything you need to know!
📋Binder NotebooksExample notebooks to play with in your browser.
👩‍💻User GuidesHow to use skpro and its features.
✂️Extension TemplatesHow to build your own estimator using skpro's API.
🎛️API ReferenceThe detailed reference for skpro's API.
🛠️ChangelogChanges and version history.
🌳Roadmapskpro's software and community development plan.
📝Related SoftwareA list of related software.

💬 Where to ask questions

Questions and feedback are extremely welcome!We strongly believe in the value of sharing help publicly, as it allows a wider audience to benefit from it.

skpro is maintained by thesktime community, we use the same social channels.

TypePlatforms
🐛Bug ReportsGitHub Issue Tracker
Feature Requests & IdeasGitHub Issue Tracker
👩‍💻Usage QuestionsGitHub Discussions ·Stack Overflow
💬General DiscussionGitHub Discussions
🏭Contribution & Developmentdev-chat channel ·Discord
🌐Community collaboration sessionDiscord - Fridays 13 UTC, dev/meet-ups channel

💫 Features

Our objective is to enhance the interoperability and usability of the AI model ecosystem:

  • skpro is compatible withscikit-learn andsktime, e.g., ansktime proba forecaster canbe built with anskpro proba regressor which in ansklearn regressor with proba mode added byskpro

  • skpro provides a mini-package management framework for first-party implementations,and for interfacing popular second- and third-party components,such ascyclic-boosting,MAPIE, orngboost packages.

skpro curates libraries of components of the following types:

ModuleStatusLinks
Probabilistic tabular regressionmaturingTutorial ·API Reference ·Extension Template
Time-to-event (survival) predictionmaturingTutorial ·API Reference ·Extension Template
Performance metricsmaturingAPI Reference
Probability distributionsmaturingTutorial ·API Reference ·Extension Template

⏳ Installingskpro

To installskpro, usepip:

pip install skpro

or, with maximum dependencies,

pip install skpro[all_extras]

Releases are available as source packages and binary wheels. You can see all available wheelshere.

⚡ Quickstart

Making probabilistic predictions

fromsklearn.datasetsimportload_diabetesfromsklearn.ensembleimportRandomForestRegressorfromsklearn.linear_modelimportLinearRegressionfromsklearn.model_selectionimporttrain_test_splitfromskpro.regression.residualimportResidualDouble# step 1: data specificationX,y=load_diabetes(return_X_y=True,as_frame=True)X_train,X_new,y_train,_=train_test_split(X,y)# step 2: specifying the regressor - any compatible regressor is valid!# example - "squaring residuals" regressor# random forest for mean prediction# linear regression for variance predictionreg_mean=RandomForestRegressor()reg_resid=LinearRegression()reg_proba=ResidualDouble(reg_mean,reg_resid)# step 3: fitting the model to training datareg_proba.fit(X_train,y_train)# step 4: predicting labels on new data# probabilistic prediction modes - pick any or multiple# full distribution predictiony_pred_proba=reg_proba.predict_proba(X_new)# interval predictiony_pred_interval=reg_proba.predict_interval(X_new,coverage=0.9)# quantile predictiony_pred_quantiles=reg_proba.predict_quantiles(X_new,alpha=[0.05,0.5,0.95])# variance predictiony_pred_var=reg_proba.predict_var(X_new)# mean prediction is same as "classical" sklearn predict, also availabley_pred_mean=reg_proba.predict(X_new)

Evaluating predictions

# step 5: specifying evaluation metricfromskpro.metricsimportCRPSmetric=CRPS()# continuous rank probability score - any skpro metric works!# step 6: evaluat metric, compare predictions to actualsmetric(y_test,y_pred_proba)>>>32.19

👋 How to get involved

There are many ways to get involved with development ofskpro, which isdeveloped by thesktime community.We follow theall-contributorsspecification: all kinds of contributions are welcome - not just code.

Documentation
💝ContributeHow to contribute to skpro.
🎒MentoringNew to open source? Apply to our mentoring program!
📅MeetingsJoin our discussions, tutorials, workshops, and sprints!
👩‍🔧Developer GuidesHow to further develop the skpro code base.
🏅ContributorsA list of all contributors.
🙋RolesAn overview of our core community roles.
💸DonateFund sktime and skpro maintenance and development.
🏛️GovernanceHow and by whom decisions are made in the sktime community.

👋 Citation

To citeskpro in a scientific publication, seecitations.


[8]ページ先頭

©2009-2025 Movatter.jp