Skip to main content

Command Palette

Search for a command to run...

3 ways to handle missing values in Machine Learning

Updated
1 min read
3 ways to handle missing values in Machine Learning

Steps to handle missing values:

  1. Drop the columns that has missing values

    • Here, we drop the columns that have missing values.

    • With this approach, there is a chance that we may lose access to lot of useful information.

    • You should use this approach only if most of the values in a column are missing and not otherwise.

  1. Imputation

    • Here, we replace all the missing values in a column with the average value of that column. For example, if column has 3, 2, 1 as values then we take average of this column that is 2 and replace it with missing values.

    • It’s a standard approach.

    • The imputed value is not always right, however, it results in good accuracy as compared to the previous way.

  1. Extension to Imputation

    • Here, we follow the process of imputation and then for each column with missing value we also create a new column.

    • The location at which the value is imputed we mark an entry in the newly created column to specify that this location has imputed value.

    • This may increase the accuracy of prediction, but in some cases it can also make no difference.