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 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.