Skip to content

Commit

Permalink
Fixed a bug that prevented recompute_every from being called at the r…
Browse files Browse the repository at this point in the history
…ight time.
  • Loading branch information
Victor Paul Principe committed May 23, 2022
1 parent 271e6fd commit 564fb61
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions skcosmo/_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
from sklearn.utils import (
check_array,
check_random_state,

@rosecers
@hurricane642
rosecers and hurricane642 Update skcosmo/_selection.py
safe_mask,
)
from sklearn.utils._tags import _safe_tags
Expand Down Expand Up @@ -579,7 +583,7 @@ def _update_post_selection(self, X, y, last_selected):
if self.recompute_every != 0:
self._orthogonalize(last_selected)

if len(self.selected_idx_) % self.recompute_every == 0:
if self.n_selected_ % self.recompute_every == 0:
self.pi_ = self._compute_pi(self.X_current_)

self.pi_[last_selected] = 0.0
Expand Down Expand Up @@ -732,7 +736,7 @@ def _update_post_selection(self, X, y, last_selected):
if self.recompute_every != 0:
self._orthogonalize(last_selected)

if len(self.selected_idx_) % self.recompute_every == 0:
if self.n_selected_ % self.recompute_every == 0:
self.pi_ = self._compute_pi(self.X_current_, self.y_current_)

self.pi_[last_selected] = 0.0
Expand Down

0 comments on commit 564fb61

Please sign in to comment.