3 ways to handle missing values in Machine Learning

Search for a command to run...

No comments yet. Be the first to comment.
India at the Crossroads of Global Power Plays

Key Insights and Takeaways from "Designing Data-Intensive Applications" Book

Master the design of scalable distributed systems capable of handling high traffic

15 Techniques to refine code

What is Git and Github? Git is a distributed version control system that is used to track the changes (different versions of the software) made by many different people (distributed) to the repository (where the software is stored) of the software. I...

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