In this session, we went to see how to handle the missing values, missing values are very much a reality.
When we develop.
Machine learning solutions you how to handle missing values if you want to have a higher focus, because
sometimes the machine learning models may even throw up errors that are missing values in your data
set.
OK.
And more fundamentally, missing values can lead to a biased model.
You can make a wrong classification to the extent of missing values.
It's more like why?
Why do we have missing values in the first place?
Can be because values can be lost when you're extracting data from from some of the system.
Right are at the time of data collection, some values might not be collected.
It can be due to an error.
Also, there can be various reasons.
But it's a it's a reality.
It's something that you cannot avoid.
Right.
You will have some missing values.
Right.
So how do we handle it, first strategy, then second strategy.
Use the value of mean or median, if it is up, if that particular missing value should have a continuous
data, like if the missing value corresponds to a categorical data use, more like you've already seen
that what is mean median mode.
Let's call DC and come back.
Right.
If you see this, this is something we saw in the previous session molders that frequently occurring
number and median is the midpoint after arranging data in ascending order.
Mean is the arithmetic average.
Right.
So if you're how missing values corresponding to a continuous data you use either mean or maybe.
If the missing data corresponds to a categorical type of data, it was more.
That's all very simple, right?
So in our data, in the insurance case study that we are looking at, we have 149 nonviolence and even
taking nonviolence according to different factors like different variables.
Now, why I'm taking it, because my strategy will be different for different types of variables.
If the variable is continuous, I replace with minimal medium in the variable is categorical.
I replace it more.
Right.
Which is the highest frequency value.
Right.
So now I am replacing.
I have no water.
I am replacing with me in the case of a continuous variable, in the case of a categorical variable
and replacing with more, as you can see the code here.
And that on this takes care of the missing girls because you are replacing with the appropriate values.
So now your dataset is complete and you're ready to move forward, right.
Very, very simple technique, but a very powerful technique in handling missing girls.
As I said, missing values must be addressed appropriately, either delete or replaced with mean million
or more.
Right.
So this completes this short session.
OK, so we go on to the next Silicon Valley, be talking about atrazine polglase, OK.
Just one last point, after replacing Chip once, if there are any missing letters.
Right.
Please ensure there are no missing just to do the check, right, to be absolutely sure that there are
no missing ones.
I found the code again and see that I need the same values as you can see in the case study that we
have taken from the caller in on the missing values.
And we're good to Moyet, right.
OK.