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

IndexingError: Unalignable boolean Series provided as indexer (index of the boolean Series and of the indexed object do not match). #37

Closed
smarie opened this issue Feb 28, 2023 · 0 comments · Fixed by #41

Comments

@smarie
Copy link
Contributor

smarie commented Feb 28, 2023

Linked with #36

This bug arises when some columns in the dataframe are not categorical, and therefore are removed by the model. If the same columnsa re provided later to fit_selector for example, the error is raised

df = pd.DataFrame({
    "nb": [1, 2],
    "name": ["A", "B"]
})
qd_forest = qd_screen(df, categorical_mode="convert")
feat_selector = qd_forest.fit_selector_model(df)
only_important_features_df = feat_selector.remove_qd(df)

A good idea would be to protect our method against invalid inputs (not the expected names or data)

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