To get the most out of this book
- You don't need to know much before we begin; the book contains refreshers on all the prerequisites needed to understand the AI models. There's also a full chapter on Python fundamentals to help you learn, if you need to, how to code in Python.
- There are no required prior installations, since all the practical instructions are provided from scratch in the book. You only need to have your computer ready and switched on.
- I recommend you have Google open while reading the book, so that you can visit the links provided in the book as resources, and to check out the math concepts behind the AI models of this book in more detail.
Download the example code files
You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files emailed directly to you.
You can download the code files by following these steps:
- Log in or register at http://www.packtpub.com.
- Select the SUPPORT tab.
- Click on Code Downloads & Errata.
- Enter the name of the book in the Search box and follow the on-screen instructions.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
- WinRAR / 7-Zip for Windows
- Zipeg / iZip / UnRarX for Mac
- 7-Zip / PeaZip for Linux
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/AI-Crash-Course. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Download the color images
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781838645359_ColorImages.pdf.
Conventions used
There are a number of text conventions used throughout this book.
CodeInText
:
Indicates code words in text, database table names, folder names,
filenames, file extensions, pathnames, dummy URLs, user input, and
Twitter handles. For example; "To get these numbers you can add together
the lists nPosReward
and nNegReward
."
A block of code is set as follows:
# Creating the dataset
X = np.zeros((N, d))
for i in range(N):
for j in range(d):
if np.random.rand() < conversionRates[j]:
X[i][j] = 1
When we wish to draw your attention to a particular line in a code block, we have included the line numbers as comments so that we can refer to them with precision:
self.last_state = new_state #80
self.last_action = new_action #81
self.last_reward = new_reward #82
return new_action #83
Any command-line input or output is written as follows:
conda install -c conda-forge keras
Bold: Indicates a new term, an important word, or words that you see on the screen, for example, in menus or dialog boxes, also appear in the text like this. For example: "Select System info from the Administration panel."
Warnings or important notes appear like this.
Tips and tricks appear like this.