0
$\begingroup$

I have a training dataset where we have to predict "Result" based on features "A", "B", "C" and "D" using machine learning. For a few rows, the "Result" is empty (7/19612).

While for the other features I have filled the NaN values with their mean, I don't understand whether or not to do so with the result column. Will it better to drop the rows entirely instead?

$\endgroup$
  • $\begingroup$ Since that's just 7/19612, I suggest you just to delete these rows from your train dataset, because the impact would be very little, not more than if you replace it by the majority class... To me, don't waste time on that, just remove $\endgroup$ – BeamsAdept Aug 17 at 9:38
0
$\begingroup$

There is no correct way as dealing with nan values it depends on the dataset.But i would suggest rather than doing single imputation you could do multiple imputation using IterativeImputer in sklearn.

As very less target variables are missing it won't make a significant impact unless the problem statement is sensitive to finding outliers like fraud detection.

Refer Iterative Imputation

| 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.