So there is a way for you
to perform machine learning on Kinesis Data Analytics.
And it turns out there are two algorithms available
for Kinesis Data Analytics.
We have the Random Cut Forest and the Hotspots Detection.
So if we are using a Random Cut Forest,
this is a SQL function that is available
as part of Kinesis Data Analytics,
and it's going to be very helpful to do anomaly detection.
So if we look at the diagram right now,
on the bottom we can see that all the dots
seem to be very well centered into a circle,
except that there are four data points in red
that look like anomalies.
And so this could be very helpful,
for example, to detect anomalous subway ridership
during the NYC marathon.
Now to compute what is an anomaly,
the algorithm on Kinesis Data Analytics
is going to use the recent history to compute
and train the model.
So that's one way of doing things
but this can come up if you want to do detection,
anomaly detection in real time on the stream.
The other option is Hotspots.
So this is to locate and return information about regions
that are going to be relatively dense in your data.
So as you can see, we have a lot of sparse
that are points on the bottom right,
but then we have two clusters of blue and red data points
and they look like hotspots.
So if we are looking at, for example, a data server,
and want to see something wrong with a cooling system,
then the servers that are next to each other
would perform and would form your hotspots.
And so we could see that there are overheated servers
in a data center this way.
And that's it, those are the only two available algorithms
for machine learning on Kinesis Data Analytics.
I hope you liked it and I will see you in the next lecture.