You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Greetings professor Raschka,
Thank you for writing such an amazing book!
On Page 132, I found a small bug in SBS class:
Original: def transform(self, X): return X[:, self.indices_]
I think the correct code should be: def transform(self, X): return X[:, self.subsets_[np.argmax(self.scores_)]
The text was updated successfully, but these errors were encountered:
@weishanlee I tried the original code with my project, and always ended up with transform method always transformed the original array into a one column array. The reason is that after fit method has been called, self.indices_ is the score of the last permutation, and what we actually want is the best score across permutations, not the last permutation itself.
Greetings professor Raschka,
Thank you for writing such an amazing book!
On Page 132, I found a small bug in SBS class:
Original:
def transform(self, X): return X[:, self.indices_]
I think the correct code should be:
def transform(self, X): return X[:, self.subsets_[np.argmax(self.scores_)]
The text was updated successfully, but these errors were encountered: