0
$\begingroup$

I wanted to know if we are dropping any independent variable as it has too many missing values(~75% or more) from the data then should we do it before splitting the data or after splitting the data

$\endgroup$
1
$\begingroup$

Whether it's removed before/after splitting doesn't matter: the variable will not appear in any part of the data so it cannot cause any data leakage anyway.

However what might matter (at least in theory) is from investigating which part of the data was the decision made. Any preprocessing and design decision should be made based on the training set only in order to avoid any risk of data leakage (see example). In practice it's not really a problem in the case you mention.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.