Skip to content

Commit

Permalink
Remove underscore so variables are cloned (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
fraimondo authored Nov 30, 2023
1 parent 80da756 commit c30c615
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions julearn/model_selection/continuous_stratified_kfold.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ def __init__(
shuffle=False,
random_state=None,
):
self._n_bins = n_bins
self.n_bins = n_bins
if method not in ["binning", "quantile"]:
raise_error(
"The method parameter must be either 'binning' or 'quantile'.",
)
self._method = method
self.method = method
super().__init__(
n_splits=n_splits, shuffle=shuffle, random_state=random_state
)
Expand Down Expand Up @@ -127,7 +127,7 @@ def split(
split. You can make the results identical by setting `random_state`
to an integer.
"""
discrete_y = _discretize_y(self._method, y, self._n_bins)
discrete_y = _discretize_y(self.method, y, self.n_bins)
return super().split(X, discrete_y, groups)


Expand Down Expand Up @@ -223,12 +223,12 @@ def __init__(
shuffle=False,
random_state=None,
):
self._n_bins = n_bins
self.n_bins = n_bins
if method not in ["binning", "quantile"]:
raise_error(
"The method parameter must be either 'binning' or 'quantile'.",
)
self._method = method
self.method = method
super().__init__(
n_splits=n_splits, shuffle=shuffle, random_state=random_state
)
Expand Down Expand Up @@ -270,7 +270,7 @@ def split(
split. You can make the results identical by setting `random_state`
to an integer.
"""
discrete_y = _discretize_y(self._method, y, self._n_bins)
discrete_y = _discretize_y(self.method, y, self.n_bins)
return super().split(X, discrete_y, groups)


Expand Down

0 comments on commit c30c615

Please sign in to comment.