Skip to content

Commit

Permalink
Removed clone call in PSO optimizer
Browse files Browse the repository at this point in the history
  • Loading branch information
jgranley committed Oct 20, 2021
1 parent 2c351f0 commit 7a9da85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pulse2percept/model_selection/optimizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def _swarm_error(self, search_vals, X, y, fit_params=None):
# Clone the estimator to make sure we have a clean slate, then fit:
if fit_params is None:
fit_params = {}
estimator = clone_estimator(self.estimator)
estimator = self.estimator
estimator.set_params(**search_params)
estimator.fit(X, y=y, **fit_params)
# If score is not a loss function, we need to invert here:
Expand Down

0 comments on commit 7a9da85

Please sign in to comment.