How it works…

For instructive purposes, we produce a toy dataset representing the percentage of each type of malware in time (Step 1). With a larger amount of historical data, such a dataset can indicate where to channel your resources in the domain of security. We collect the data in one place and produce visualization plots (Step 2). We would like to perform simple forecasting, so we import ARMA, which stands for autoregressive–moving-average model, and is a generalization of the moving-average model. For simplicity, we specialize ARMA to moving average (MA). In Step 4, we employ MA to make a prediction on how the percentages of malware will evolve to the next time period. With a larger dataset, it is prudent to attempt different models, ...

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.