To create a professional model, you should understand your target variable.
So here in the statistical summary we have this mpg.
We have the count mean standard deviation minimum and maximum.
So let's visualize the target variable here.
Let me create a new cell I want from you to understand the figures and the charts because they are very
important.
And I used them for understanding my data.
So here in this video we're gonna visualize the target variable which is the mpg.
Start with plt dot figure.
We are going to create a new figure using plt matplot library.
And figure size is ten by six.
The plot dot.
We need to pass the data set MPEG the bins 20 colour sky blue, edge colour black.
Set the X label to MPEG, the Y label to frequency the title distribution of MPEG and then show the
plot.
So those things those value functions and uh, and parameters.
We learned about them in the previous videos.
So don't worry guys, they are very simple.
Please go back to learn more about them.
And you can see they are very clear.
So here I am plotting the figure using Plt.figure creating a figure size ten by six you can reduce its
size.
For example, you can make it like uh eight by four.
It's good.
Let me run.
You see, the size of the the figure is decreased.
Uh, so I'm creating a histogram parsing the data set mpg.
So the data set is a variable and an array of type array.
And here I'm accessing the mpg element.
So here guys the element mpg of the data set are being drawn.
The bins 20 color sky blue edge color black.
So here you have for example 20 and title distribution of mpg.
The x label which is the x axis is mpg, the y axis is frequency and plot.
The true.
Here we have our distribution of mpg.
You see guys we started from the minimum is nine and the maximum is 46.
You see the range of mpg.
And you notice that the frequency the most uh, higher frequency is this which is 40 around 40 and it's
below 15.
So miles per gallon is below 15.
It's the most frequently distributed mpg for all data set.
And those who, for example, makes more than 46 or from 40 and above, they are the most least, uh,
cars.
Okay, so this card and this type of cards makes the highest, the lowest, the lowest car's number
of cars, but they make the highest mpg because as the mpg increases, the car becomes more economy.
So here, guys, those are the most economic cars, but they all have the least and the lowest frequency.