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 random_state
parameter allows us to reproduce the split.”
A block of code is set as follows:
from sklearn.model_selection import train_test_split X_train, X_test, y_train, y_test = train_test_split(wine.data, wine.target, test_size=0.2, random_state=42)
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
# Make predictions on the test set and calculate the accuracy y_pred_tree = tree.predict(X_test) accuracy_tree = accuracy_score(y_test, y_pred_tree)
Any command-line input or output is written as follows:
python -m ipykernel install --user --name=secure-ai --display-name="Secure AI"
Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “Navigate to API Keys and create a new key.”
Tips or important notes
Appear like this.