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

Theoretical Error in Feature Selection #5

Open
Subhasis-Biswas opened this issue Sep 28, 2024 · 0 comments
Open

Theoretical Error in Feature Selection #5

Subhasis-Biswas opened this issue Sep 28, 2024 · 0 comments

Comments

@Subhasis-Biswas
Copy link

Subhasis-Biswas commented Sep 28, 2024

Feature selection is being done prior to train-test split, which can cause data leakage.

Link to discussion: https://stackoverflow.com/questions/56308116/should-feature-selection-be-done-before-train-test-split-or-after

--
Even though here only the correlation of features are being considered during feature selection (not regarding the target into consideration), the computation of correlation-coefficient itself requires the knowledge of the mean of the entire column, thus unknowingly (in this case) causing a leakage of test information to the train. This needs correction in my opinion.

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

1 participant