So let's identify and treat outliers in Python.
So from our EDT, we identify three variables.
That we want to look at, since we definitely know that rainfall and and how grooms gun ban all play
it.
We will directly write a function to read them.
Before that, if you remember, in order to re lecture, we discussed about capping and loading.
So first, we need to identify them.
99 and the one but Sunday value of these two variables to do that.
That is a function in Mumbai called percentile.
We'll first look at the function we'll write and be percentile.
Then first argument, we have to pass the column name.
So we read Beef Dot and Groomes.
And then in the square of it, we will write the percentile value.
We want to see.
So we want the 99.
All right.
Ninety nine.
Then on this score.
You can see this is an array in the 99 percentile of and half grooms is fifteen point three nine nine
five two.
But the output here is an array.
So remember, if we want to fit the first number, often today, we have to specify the location of
that value in the square record.
So we'll write and be that person day.
Beef.
And our brooms.
99 for 99 percent pain.
And then after that, in a square record, we'll read zero.
So we are actually getting the first element of this, Ray.
We will save the value of this 99 percentile and another variable which we call upper limit.
So we will write you.
We.
So we are just saving this fifteen point three nine nine value in another way, Raybuck, you we.
Now, how to identify the rules of the and hard growing value is more than this number, who do that
will right, B.F.?
And squared record will rate the condition we're.
Beef, goat and hard groom.
It's more than you'll see.
So we'll write it out.
Then you'll be.
Then you we when we done this, go on.
You can see we are getting all the values we're over and the growing value is greater than this 99 percent
daily value and courtroom's.
You remember the you we will lose.
We've been burned three nine nine.
So if you see we are getting all the rules we have, this value is greater than this SUV.
Well, you know, we wanted to limit this value.
If you remember, in our capping and loading, we discovered that we can multiply this value by any
BGA or any value we can replace those values.
No, we know how to identify the outliers in our data.
Now let's just cap this well loose.
Now for our case, we are picking an inquiry to the multiplication of a local two three.
Since we only want to believe the genuine outliers.
Which is.
Hundred and one and eighty one.
And we don't want to touch these three outliers.
That is for pinpoint or to zero, which is very close below.
What are you we value.
That's why we are taking an inquiry to three.
All right.
B.F. Thought and Hot Grooms.
We want to change the values of this word evil.
That's why we are selecting this very evil only and in record will specify the condition where we have
Dorte and Heart Groomes.
Is greater than three EUI.
So 3U is approximately 46.
So you can see or these two are four hundred and one and 86.
We want to limit this and cap this well loose.
And we want to limit this by value equal to three.
We.
Fit on this.
This is just a warning, not an.
So we can continue now if we rerun this a statement.
We'll see.
We have limited the value to BASIX basics.
This was Arone hundred and this was around 80.
Now we are getting a constant value of what basics?
This is how we treat our players using Biton.
Similarly, in the rainfall, there are values which are outlined on the lower side.
Let's identify the outliers in rainfall and treat them as a.
We will write and be dorkbot Sunday.
If not green for.
And we won the first Whitsuntide value.
Since the outlier on Lordan and we won the first value of this update, that's why we have put zero.
The value is 20.
Now, we will save this value in another variable called Elvie.
That is the lower value.
Let me quote put this on.
Our LDV is a variable which is containing this first percentile value.
Now we compare this, Elvie, with our array.
And we'll try to identify all the values which are lower than this and we value.
Right.
Beer.
We're being bought green for.
Is less than an.
Run this.
You can see we are only getting one single value.
We are the rainfall value is three.
So this is definitely an outlier and we should treat it.
As mentioned in the teary lecture for the lower values will multiply by a decimal point.
So in our case, we will write zero point three.
We will select all the values.
Where we have no rainfall is less than zero point three into two, Elvie.
And we will equate it to zero one three times of every.
We've done this and we'll.
We've done this statement again.
You can see that the.
Rainfall value is now six and sort of three.
That is how we treat outlands using Biton.
So, no, since we have treated our outlets.
Let's take a look at what UDD once more.
All right.
The if not disgraced.
Let's look at the hotel rooms and rainfall.
As you can see now, the maximum value is 46.
And the mean and median values are a lot closer than before.
Similarly for rainfall, the lower value is now six instead of three.
And again, the median value is closer to the mean value.
That's all for Eau Claire treatment and identification and buy them.