Hi. In this video we will learn how to do multivariate analysis.
We can plot the same scatter plot of count and service count variable, uh,
but we can add a category variable, uh, to color the points
like here. And now we see, um, other patterns.
This area here is the Smurf attack. It has the, uh,
high values of count and also of service count variable.
This area here is the Saturn attack, uh,
which has high values of count variable, uh, but low values, um,
around zero of service count variable.
The normal connections are centered around here
and here. This part, uh, this should be the Neptune attack.
Uh, noticed also that, uh, I use the parameter, uh,
to plot our points a little bit smaller.
We can do the same with a numeric variable, uh, which can also be, uh,
used as a u or a color variable. Uh,
here I wanted to see, uh,
if there are any interesting patterns between destination host, service count,
variable count around source bytes variable.
We see again that uh,
most of the values of source bytes variable are around zero.
Uh, but here around 150 we see a little bit different color.
And, uh, also here in the corner
in scatterplot,
we can add another variable which maps its values to size of the points.
Like here in this example, uh, we see that, uh,
the most of the connections are via U D P protocol and have
count and service count variable around zero. But to have a better view,
we should investigate closer because it might be just few outliers.
When doing analysis of two categorical variables and one numeric,
we can do a a faceted group box plot.
Like here in this example here,
each subplot is an attack and is distribution of count variable per
flag
type of charts for analysis of two ric or variables.
And one numeric might be a heat map,
but here you lose some information about the whole distribution. Uh,
but when some, uh, summary statistic, uh, like mean or median is okay for you,
uh, then it's fine.
Here in the next example,
I have plotted a density plot of count variable colored by flag variable
categories and faceted by attack.
Remember that before using pandas plot method,
we had to calculate the probabilities manually, but the seaborn,
this plot has attribute multiple.
And here we can set the value field and the result
will be the same.
In our next video, we will learn, uh,
some information about few other interesting charts.