To get the most out of this book
Artificial intelligence projects rely on three factors:
- Understanding the subject the AI project will be applied to. To do so, go through a chapter to pick up the key ideas. Once you understand the key ideas of a case study described in the book, try to see how an AI solution can be applied to real-life examples around you.
- The mathematical foundations of the AI algorithms. Do not skip the mathematics equations if you have the energy to study them. AI relies heavily on mathematics. There are plenty of excellent websites that explain the mathematics used in this book.
- Development. An artificial intelligence solution can be directly used on an online cloud platform machine learning site such as Google. We can access these platforms with APIs. In the book, Google Cloud is used several times. Try to create an account of your own to explore several cloud platforms to understand their potential and their limits. Development remains critical for AI projects.
Even with a cloud platform, scripts and services are necessary. Also, sometimes, writing an algorithm is mandatory because the ready-to-use online algorithms are insufficient for a given problem. Explore the programs delivered with the book. They are open source and free.
Technical requirements
The following is a non-exhaustive list of the technical requirements for running the codes in this book. For a more detailed chapter-wise list, please refer to this link: https://github.com/PacktPublishing/Artificial-Intelligence-By-Example-Second-Edition/blob/master/Technical%20Requirements.csv.
Package | Website |
Python |
|
NumPy |
|
Matplotlib |
|
pandas |
|
SciPy |
|
scikit-learn |
|
PyDotPlus |
|
Google API |
|
html |
|
TensorFlow 2 |
|
Keras |
|
Pillow |
|
Imageio |
|
Pathlib |
|
OpenCV-Python |
|
Google Dialogflow |
|
DEAP |
|
bitstring |
|
nengo |
|
nengo-gui |
|
IBM Q |
|
Quirk |
Download the example code files
You can download the example code files for this book from your account at www.packt.com/. If you purchased this book elsewhere, you can visit 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.packt.com.
- Select the Support tab.
- Click on Code Downloads.
- 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/Artificial-Intelligence-By-Example-Second-Edition. In case there's an update to the code, it will be updated on the existing GitHub repository.
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/9781839211539_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; "The decision tree program, decision_tree.py
, reads the output of the KMC predictions, ckmc.csv
."
A block of code is set as follows:
# load dataset
col_names = ['f1', 'f2','label']
df = pd.read_csv("ckmc.csv", header=None, names=col_names)
if pp==1:
print(df.head())
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
for i in range(0,1000):
xf1=dataset.at[i,'Distance']
xf2=dataset.at[i,'location']
X_DL = [[xf1,xf2]]
prediction = kmeans.predict(X_DL)
Any command-line input or output is written as follows:
Selection: BnVYkFcRK Fittest: 0 This generation Fitness: 0 Time Difference: 0:00:00.000198
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: "When you click on SAVE, the Emotions progress bar will jump up."
Warnings or important notes appear like this.
Tips and tricks appear like this.