-
-
Notifications
You must be signed in to change notification settings - Fork 586
Open
Description
SelectKBest
transformer currently ranks features based on raw Pearson correlation values [-1,1]. So features that are negatively correlated with the target might be excluded, even if they are highly predictive.
e.g:
0.8 → ranked high
−0.9 → ranked low or excluded, despite being stronger
Possible fix is to add a new param use_abs
to allow user to control using absolute value and adding it to learn_one
method.
def learn_one(self, x, y):
for i, xi in x.items():
self.similarities[i].update(xi, y)
if self.use_abs:
similarity_value = abs(self.similarities[i].get())
else:
similarity_value = self.similarities[i].get()
self.leaderboard[i] = similarity_value
Metadata
Metadata
Assignees
Labels
No labels