WEBVTT

00:00.120 --> 00:07.080
To create a professional model, you should understand your target variable.

00:07.320 --> 00:12.240
So here in the statistical summary we have this mpg.

00:12.600 --> 00:16.760
We have the count mean standard deviation minimum and maximum.

00:16.880 --> 00:21.240
So let's visualize the target variable here.

00:21.600 --> 00:30.840
Let me create a new cell I want from you to understand the figures and the charts because they are very

00:30.840 --> 00:31.560
important.

00:31.560 --> 00:35.560
And I used them for understanding my data.

00:35.640 --> 00:42.840
So here in this video we're gonna visualize the target variable which is the mpg.

00:43.040 --> 00:46.520
Start with plt dot figure.

00:46.640 --> 00:51.760
We are going to create a new figure using plt matplot library.

00:51.880 --> 00:55.200
And figure size is ten by six.

00:55.360 --> 00:57.520
The plot dot.

00:57.800 --> 01:06.810
We need to pass the data set MPEG the bins 20 colour sky blue, edge colour black.

01:07.050 --> 01:17.490
Set the X label to MPEG, the Y label to frequency the title distribution of MPEG and then show the

01:17.530 --> 01:18.250
plot.

01:18.250 --> 01:25.090
So those things those value functions and uh, and parameters.

01:25.090 --> 01:27.850
We learned about them in the previous videos.

01:27.850 --> 01:31.530
So don't worry guys, they are very simple.

01:31.530 --> 01:34.170
Please go back to learn more about them.

01:34.330 --> 01:36.890
And you can see they are very clear.

01:36.890 --> 01:45.210
So here I am plotting the figure using Plt.figure creating a figure size ten by six you can reduce its

01:45.570 --> 01:46.210
size.

01:46.210 --> 01:50.930
For example, you can make it like uh eight by four.

01:51.050 --> 01:52.010
It's good.

01:52.010 --> 01:52.930
Let me run.

01:53.170 --> 01:57.130
You see, the size of the the figure is decreased.

01:57.170 --> 02:02.850
Uh, so I'm creating a histogram parsing the data set mpg.

02:02.890 --> 02:07.370
So the data set is a variable and an array of type array.

02:07.650 --> 02:11.810
And here I'm accessing the mpg element.

02:11.810 --> 02:17.370
So here guys the element mpg of the data set are being drawn.

02:17.410 --> 02:22.610
The bins 20 color sky blue edge color black.

02:22.610 --> 02:29.410
So here you have for example 20 and title distribution of mpg.

02:29.650 --> 02:38.170
The x label which is the x axis is mpg, the y axis is frequency and plot.

02:38.210 --> 02:38.850
The true.

02:38.890 --> 02:42.290
Here we have our distribution of mpg.

02:42.610 --> 02:48.890
You see guys we started from the minimum is nine and the maximum is 46.

02:48.890 --> 02:50.930
You see the range of mpg.

02:51.330 --> 03:02.700
And you notice that the frequency the most uh, higher frequency is this which is 40 around 40 and it's

03:02.700 --> 03:04.020
below 15.

03:04.020 --> 03:07.860
So miles per gallon is below 15.

03:08.020 --> 03:13.860
It's the most frequently distributed mpg for all data set.

03:13.860 --> 03:24.100
And those who, for example, makes more than 46 or from 40 and above, they are the most least, uh,

03:24.780 --> 03:25.460
cars.

03:25.500 --> 03:34.300
Okay, so this card and this type of cards makes the highest, the lowest, the lowest car's number

03:34.300 --> 03:45.140
of cars, but they make the highest mpg because as the mpg increases, the car becomes more economy.

03:45.140 --> 03:54.140
So here, guys, those are the most economic cars, but they all have the least and the lowest frequency.
