|
14 | 14 | from ._isotonic import _inplace_contiguous_isotonic_regression, _make_unique
|
15 | 15 | from .base import BaseEstimator, RegressorMixin, TransformerMixin, _fit_context
|
16 | 16 | from .utils import check_array, check_consistent_length
|
17 |
| -from .utils._param_validation import Interval, StrOptions |
| 17 | +from .utils._param_validation import Interval, StrOptions, validate_params |
18 | 18 | from .utils.validation import _check_sample_weight, check_is_fitted
|
19 | 19 |
|
20 | 20 | __all__ = ["check_increasing", "isotonic_regression", "IsotonicRegression"]
|
@@ -79,6 +79,16 @@ def check_increasing(x, y):
|
79 | 79 | return increasing_bool
|
80 | 80 |
|
81 | 81 |
|
| 82 | +@validate_params( |
| 83 | + { |
| 84 | + "y": ["array-like"], |
| 85 | + "sample_weight": ["array-like", None], |
| 86 | + "y_min": [Interval(Real, None, None, closed="both"), None], |
| 87 | + "y_max": [Interval(Real, None, None, closed="both"), None], |
| 88 | + "increasing": ["boolean"], |
| 89 | + }, |
| 90 | + prefer_skip_nested_validation=True, |
| 91 | +) |
82 | 92 | def isotonic_regression(
|
83 | 93 | y, *, sample_weight=None, y_min=None, y_max=None, increasing=True
|
84 | 94 | ):
|
|
0 commit comments