Skip to content

Comments

[ENH] skpro integration#200

Merged
SimonBlanke merged 20 commits intohyperactive-project:mainfrom
fkiraly:skpro-experiment
Sep 30, 2025
Merged

[ENH] skpro integration#200
SimonBlanke merged 20 commits intohyperactive-project:mainfrom
fkiraly:skpro-experiment

Conversation

@fkiraly
Copy link
Collaborator

@fkiraly fkiraly commented Sep 26, 2025

Closes #194, adds integration with skpro:

  • ProbaRegExperiment to benchmark skpro estimators
  • ProbaRegOptCV to tune skpro estimators

Also refactors the handling of default splitter coercion to a common module in experiment.integrations._skl_cv.

@fkiraly fkiraly added the enhancement New feature or request label Sep 26, 2025
"scikit-learn <1.8.0",
]
sktime-integration = [
"skpro",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we constrain the version here to avoid breaking changes in the future? (Also important for sktime and other deps.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is only for the tests (imo), so no constraint is better - should skpro etc break anything, then we would see it in the tests, as a warning that something is no longer interoperable.

_tags = {
"authors": "fkiraly",
"maintainers": "fkiraly",
"python_dependencies": "sktime",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be skpro, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, fixed


# default handling for cv
if isinstance(cv, int):
from sklearn.model_selection import KFold
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant imports. Should be refactored

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -0,0 +1,314 @@
"""Experiment adapter for skpro corss-validation experiments."""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

self._scoring = scoring

# Set the sign of the scoring function (rely on sklearn scorer if present)
if self._scoring.get_tag("lower_is_better"):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the following will happen here:
If "self._scoring = scoring"
then:
"AttributeError: 'str' object has no
attribute 'get_tag'"

Can you confirm?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it needs to be an skpro metric, so should always have get_tag?

Copy link
Collaborator

@SimonBlanke SimonBlanke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small fixed needed + Questions

@fkiraly fkiraly requested a review from SimonBlanke September 27, 2025 14:04
@fkiraly fkiraly mentioned this pull request Sep 27, 2025
@fkiraly
Copy link
Collaborator Author

fkiraly commented Sep 29, 2025

(changes made)

@SimonBlanke SimonBlanke merged commit aee4558 into hyperactive-project:main Sep 30, 2025
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH] skpro integration

2 participants