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

Bug: MinRedundancyMaxRelevance Function Modifies Input DataFrame by Adding target Column #39

Closed
Pacman1984 opened this issue Nov 28, 2023 · 2 comments
Assignees

Comments

@Pacman1984
Copy link
Contributor

Description

The MinRedundancyMaxRelevancy class adds the target column to X.

Steps to Reproduce

  1. Import the MinRedundancyMaxRelevancy class
  2. Create a DataFrame X and a target series y.
  3. Call the MinRedundancyMaxRelevancy fit function with X and y as inputs.
  4. Observe that the target column is unexpectedly added to DataFrame X.

Expected Behavior

The ``MinRedundancyMaxRelevancyfit method should compute the necessary values and return them without modifying the input DataFrameX`.

Actual Behavior

The input DataFrame X is being modified by having the target column appended to it after calling MinRedundancyMaxRelevancy fit method.
image

@Pacman1984
Copy link
Contributor Author

This is not happening with a custom relevance_func and redundancy_func setup

@ThomasBury
Copy link
Owner

Good catch, I added the missing copy() to prevent modifying the input pandas DF when fitting the selector

@ThomasBury ThomasBury self-assigned this Dec 4, 2023
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

No branches or pull requests

2 participants