Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logical error in selecting the most frequent categorical features based on the most frequent nearest neighbours of the majority class. #494

Closed
RaghuSpaceRajan opened this issue Nov 3, 2018 · 0 comments · Fixed by #497

Comments

@RaghuSpaceRajan
Copy link

col_sel = rng.choice(col_max == col_max.max())

Doing a choice() on col_max == col_max.max() returns a True or False and not the index of the wanted column.
I replaced it with:
col_sel = rng.choice(np.where(col_max == col_max.max())[0])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant