Conventions used
There are a number of text conventions used throughout this book.
Code in text
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “ The hyperparameter optimization methods in the scikit-learn
Python library assume good performance scores are negative values close to zero.”
A block of code is set as follows:
import pandas as pd, numpy as np from collections import Counter import matplotlib.pyplot as plt
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
prediction = one_class_svm.predict(X_test) prediction = [1 if i == -1 else 0 for i in prediction] #outliers denoted by 1, inliers by 0 print(classification_report(y_test, prediction))
Tips or important notes
Appear like this.