Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] adapter for sklearn probabilistic regressors #163

Merged
merged 4 commits into from
Jan 3, 2024
Merged

Conversation

fkiraly
Copy link
Collaborator

@fkiraly fkiraly commented Jan 1, 2024

Adds an adapter for sklearn probabilistic regressors, such as BayesianRidge or GaussianProcessRegressor.

This adapter can later be used for concrete shorthands.

Internally - like sklearn - the adapter assumes a predict interface with return_std and a normal predictive distribution.

@fkiraly fkiraly added enhancement module:regression probabilistic regression module interfacing algorithms Interfacing existing algorithms/estimators from third party packages labels Jan 1, 2024
Copy link

codecov bot commented Jan 1, 2024

Codecov Report

Attention: 267 lines in your changes are missing coverage. Please review.

Comparison is base (dd4f17b) 71.67% compared to head (96d0675) 64.65%.
Report is 41 commits behind head on main.

❗ Current head 96d0675 differs from pull request most recent head 26b9ab0. Consider uploading reports for the commit 26b9ab0 to get more accurate results

Files Patch % Lines
skpro/regression/multiquantile.py 51.40% 47 Missing and 5 partials ⚠️
skpro/regression/mapie.py 23.21% 43 Missing ⚠️
skpro/tests/scenarios/scenarios.py 42.02% 22 Missing and 18 partials ⚠️
...kpro/regression/adapters/sklearn/_sklearn_proba.py 36.11% 23 Missing ⚠️
skpro/tests/scenarios/scenarios_getter.py 44.73% 14 Missing and 7 partials ⚠️
skpro/datatypes/_check.py 19.04% 14 Missing and 3 partials ⚠️
skpro/datatypes/_table/_convert.py 69.69% 5 Missing and 5 partials ⚠️
skpro/regression/base/_base.py 76.19% 4 Missing and 6 partials ⚠️
skpro/tests/scenarios/scenarios_regressor_proba.py 85.71% 4 Missing and 4 partials ⚠️
skpro/tests/test_all_estimators.py 86.44% 4 Missing and 4 partials ⚠️
... and 9 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #163      +/-   ##
==========================================
- Coverage   71.67%   64.65%   -7.03%     
==========================================
  Files          93      112      +19     
  Lines        4950     5743     +793     
  Branches      900     1071     +171     
==========================================
+ Hits         3548     3713     +165     
- Misses       1173     1745     +572     
- Partials      229      285      +56     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fkiraly fkiraly merged commit b483e46 into main Jan 3, 2024
36 checks passed
fkiraly added a commit that referenced this pull request Jan 5, 2024
This PR exposes probabilistic regressors in `sklearn` with the `skpro`
interface.

The PR covers what I believe is the totality of such regressors:

* two bayesian linear regressors
* the gaussian process regressor

Relies on the adapter introduced in
#163
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement interfacing algorithms Interfacing existing algorithms/estimators from third party packages module:regression probabilistic regression module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant