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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.