Skip to content

Commit

Permalink
Update knn_regressor.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxHalford committed Aug 9, 2023
1 parent fb8d71e commit 760236a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions river/neighbors/knn_regressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,8 @@ def _check_aggregation_method(self, method):
"""
if method not in {self._MEAN, self._MEDIAN, self._WEIGHTED_MEAN}:
raise ValueError(
"Invalid aggregation_method: {}.\n"
"Valid options are: {}".format(
method, {self._MEAN, self._MEDIAN, self._WEIGHTED_MEAN}
)
f"Invalid aggregation_method: {method}.\n"
f"Valid options are: {(self._MEAN, self._MEDIAN, self._WEIGHTED_MEAN)}"
)

def learn_one(self, x, y):
Expand Down

0 comments on commit 760236a

Please sign in to comment.