Skip to content

Commit 1880bda

Browse files
committed
Indicate that y is not required in __sklearn_tags__
1 parent 69769fe commit 1880bda

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

pykoop/koopman_pipeline.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,6 +1627,7 @@ def _validate_feature_names(self, X: np.ndarray) -> None:
16271627

16281628
def __sklearn_tags__(self):
16291629
tags = super().__sklearn_tags__()
1630+
tags.target_tags.required = False
16301631
tags.target_tags.single_output = False
16311632
tags.target_tags.multi_output = True
16321633
return tags

pykoop/lmi_regressors.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ class LmiRegressor(koopman_pipeline.KoopmanRegressor):
9999

100100
def __sklearn_tags__(self):
101101
tags = super().__sklearn_tags__()
102+
tags.target_tags.required = False
102103
tags.target_tags.single_output = False
103104
tags.target_tags.multi_output = True
104105
# Hard to guarantee exact idempotence when calling external solver.
@@ -2382,6 +2383,7 @@ def predict(self, X: np.ndarray) -> np.ndarray:
23822383

23832384
def __sklearn_tags__(self):
23842385
tags = super().__sklearn_tags__()
2386+
tags.target_tags.required = False
23852387
tags.target_tags.single_output = False
23862388
tags.target_tags.multi_output = True
23872389
return tags

pykoop/regressors.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ def _validate_parameters(self) -> None:
397397

398398
def __sklearn_tags__(self):
399399
tags = super().__sklearn_tags__()
400+
tags.target_tags.required = False
400401
tags.target_tags.single_output = False
401402
tags.target_tags.multi_output = True
402403
# The `dmd.Dmd` class requires X and y to have the samenumber of
@@ -513,6 +514,7 @@ def _validate_parameters(self) -> None:
513514

514515
def __sklearn_tags__(self):
515516
tags = super().__sklearn_tags__()
517+
tags.target_tags.required = False
516518
tags.target_tags.single_output = False
517519
tags.target_tags.multi_output = True
518520
# Allow a bad score since the ``coef_`` matrix will be filled with

0 commit comments

Comments
 (0)