To get the most out of this book
This book assumes that you’re a manager, researcher, or data scientist with at least a passing understanding of machine learning and machine learning techniques. It doesn’t assume detailed knowledge. To use the example code, it also pays to have some knowledge of working with Python because there are no tutorials provided in the book. All of the coded examples have been tested on both Google Colab and with Anaconda. The Setting up for the book section of Chapter 1, Defining Machine Learning Security, provides detailed setup instructions for the book examples.
The advantages of using Google Colab are that you can code anywhere (even your smartphone or television set, both of which have been tested by other readers) and you don’t have to set anything up. The disadvantages of using Google Colab are that not all of the book examples will run in this environment (especially Chapter 7) and your code will tend to run slower (especially Chapter 10). When working with Google Colab, all you need do is direct your browser to https://colab.research.google.com/notebooks/welcome.ipynb and create a new notebook.
The advantage of using Anaconda is that you have more control over your work environment and you can perform more tasks. The disadvantage of using Anaconda is that you need a desktop system with the required hardware and software, as described in the following table, for most of the book examples. (The MLSec; 01; Check Versions.ipynb
example shows how to verify the version numbers of your software.) Some examples will require additional setup requirements and those requirements are covered as part of the example description (for example, when creating the Pix2Pix GAN in Chapter 10, you need to install and configure TensorFlow).
General software covered in the book |
Operating system and hardware requirements |
Anaconda 3, 2020.07 |
Windows 7, 10, or 11 macOS 10.13 or above Linux (Ubuntu, RedHat, and CentOS 7+ all tested) |
Python 3.8 or higher (version 3.9.x is highly recommended, versions above 3.10.7 aren’t recommended or tested) |
The test system uses this hardware, which is considered minimal: Intel i7 CPU 8 GB RAM 500 GB hard drive |
NumPy 1.18.5 or greater (version 1.21.x is highly recommended) |
|
Scikit-learn 0.23.1 or greater (version 1.0.x is highly recommended) |
|
Pandas 1.1.3 or greater (version 1.4.x is highly recommended) |
When working with any version of the book, downloading the downloadable source code is highly recommended to avoid typos. Copying and pasting code from the digital version of the book will very likely result in errors. Remember that Python is a language that depends on formatting to deal with things like structure and to show where programming constructs such as for
loops begin and end. The source code downloading instructions appear in the next section.