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

[MNT] 2.4.0 deprecations and change actions #404

Merged
merged 2 commits into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions skpro/regression/cyclic_boosting.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ def __init__(
feature_properties=None,
alpha=0.2,
mode="multiplicative",
bound="deprecated",
lower=None,
upper=None,
maximal_iterations=10,
Expand All @@ -150,7 +149,6 @@ def __init__(
self.feature_properties = feature_properties
self.alpha = alpha
self.mode = mode
self.bound = bound
self.lower = lower
self.upper = upper
self.maximal_iterations = maximal_iterations
Expand All @@ -164,36 +162,6 @@ def __init__(
self.quantile_est = list()
self.qpd = None

# todo 2.4.0: remove bound parameter and this deprecation warning
if bound == "deprecated":
warnings.warn(
"In CyclicBoosting, the 'bound' parameter is deprecated, "
"and will be removed in skpro version 2.4.0. "
"To retain the current behavior, and silence this warning, "
"do not set the 'bound' parameter "
"and set 'lower' and 'upper' parameters instead, "
"as follows: for unbounded mode, previously bound='U', "
"set 'lower' and 'upper' to None; "
"for semi-bounded mode, previously bound='S', "
"set 'lower' to lower bound and 'upper' to None; "
"for bounded mode, previously bound='B', "
"set 'lower' to lower bound and 'upper' to upper bound.",
DeprecationWarning,
stacklevel=2,
)

# todo 2.4.0: remove this block
# translate bound to lower and upper
if lower is None and bound in ["S", "B"]:
self._lower = 0.0
else:
self._lower = None
if upper is None and bound == "B":
self._upper = 1.0
else:
self._upper = upper
# end block

# check parameters
if (not isinstance(feature_groups, list)) and feature_groups is not None:
raise ValueError("feature_groups needs to be list")
Expand Down Expand Up @@ -342,7 +310,6 @@ def _predict_proba(self, X):
yhat = est.predict(X.copy())
self.quantile_values.append(yhat)

# todo 2.4.0: replace self._lower and self._upper with self.lower and self.upper
# Johnson Quantile-Parameterized Distributions
params = {
"alpha": self.alpha,
Expand Down
2 changes: 1 addition & 1 deletion skpro/regression/linear/_glm.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def _str_to_sm_family(self, family, link):

return sm_fmly[family]()

# TODO (release 2.4.0)
# TODO (release 2.5.0)
# replace the existing definition of `__init__` with
# the below definition for `__init__`.
# def __init__(
Expand Down
Loading