Predicting

Let's use the classifier to predict the type of traffic being observed:

  1. To predict a new instance of traffic, collect the pcap file.
  2. Using Python, run the predict.py script with the pcap file as an argument:

The clustering by the author looks like this:

The preceding diagram shows that the features do indeed differentiate between the type of traffic, despite it being anonymous.

Get Machine Learning for Cybersecurity Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.