Getting ready

Preparation for this recipe consists of installing the scikit-learn and imbalanced-learn pip packages. The instructions are as follows:

pip install sklearn imbalanced-learn

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.