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