0
$\begingroup$

I am currently working on a ML problem where the features used for modelling are sourced from different places/providers. It is very unlikely to find the features from all the different sources to be present for the same subject. So my data count looks something like the following:

Feat Group 1 Feat Group 2 Feat Group 3 No of Records
Missing Missing Missing 5000
Missing Missing NOT MISSING 5000
Missing NOT MISSING Missing 5000
Missing NOT MISSING NOT MISSING 200
NOT MISSING Missing Missing 5000
NOT MISSING Missing NOT MISSING 200
NOT MISSING NOT MISSING Missing 200
NOT MISSING NOT MISSING NOT MISSING 100

I have modelled using the "usual" imputation strategies like single value imputation but I am unsure if this is the best way to handle this scenario.

Any other strategies that I could use here?

$\endgroup$

1 Answer 1

1
$\begingroup$

There are multiple ways that you can deal with the missing values. First, check if the values are missing at random or due to some reason. If they are missing due to some reason for, e.g., let's say you stand outside a store asked people to fill a form. And the form include “Age”. Women tend to keep that column empty.(It's a bad example, but you know what I mean by missing due to some reason now). On the other side, let's say if you have weather data, there might be missing values due to any unimaginable reason. That's a missing at random. Now after this there are mainly four ways that you can use to impute values:

  1. Impute missing values with some values. e.g., 0 or -999. After that, you can consider these values as outliers and either remove them or keep them.
  2. Impute missing values with mean or median values. This only works when you are with missing values in numerical column. In this, first look if the histogram is skewed, or it's normal. If it's skewed then use median value and if it's normally distributed then you can either use mean or median.
  3. You can use KnnImputer to fill the missing values. It's an algorithmic way to fill the missing values based on the distance metric.
  4. You can consider the whole column with the missing values as your target column and create models to predict on that column values.

One final word on missing values, this is not a rule of thumb, but if you have a column with missing values more than 25% then usually it's a good idea to drop that column.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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