Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Artificial Intelligence By Example
Artificial Intelligence By Example

Artificial Intelligence By Example: Acquire advanced AI, machine learning, and deep learning design skills , Second Edition

eBook
$20.98 $29.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Table of content icon View table of contents Preview book icon Preview Book

Artificial Intelligence By Example

Building a Reward Matrix – Designing Your Datasets

Experimenting and implementation comprise the two main approaches of artificial intelligence. Experimenting largely entails trying ready-to-use datasets and black box, ready-to-use Python examples. Implementation involves preparing a dataset, developing preprocessing algorithms, and then choosing a model, the proper parameters, and hyperparameters.

Implementation usually involves white box work that entails knowing exactly how an algorithm works and even being able to modify it.

In Chapter 1, Getting Started with Next-Generation Artifcial Intelligence through Reinforcement Learning, the MDP-driven Bellman equation relied on a reward matrix. In this chapter, we will get our hands dirty in a white box process to create that reward matrix.

An MDP process cannot run without a reward matrix. The reward matrix determines whether it is possible to go from one cell to another, from A to B. It is like a map of a city that...

Designing datasets – where the dream stops and the hard work begins

As in the previous chapter, bear in mind that a real-life project goes through a three-dimensional method in some form or other. First, it's important to think and talk about the problem in need of solving without jumping onto a laptop. Once that is done, bear in mind that the foundation of machine learning and deep learning relies on mathematics. Finally, once the problem has been discussed and mathematically represented, it is time to develop the solution.

First, think of a problem in natural language. Then, makemathematical description of a problem. Only then should you begin the software implementation.

Designing datasets

The reinforcement learning program described in the first chapter can solve a variety of problems involving unlabeled classification in an unsupervised decision-making process. The Q function can be applied to drone, truck, or car deliveries. It...

Logistic activation functions and classifiers

Now that the value of each location of L = {l1, l2, l3, l4, l5, l6} contains its availability in a vector, the locations can be sorted from the most available to the least available location. From there, the reward matrix, R, for the MDP process described in Chapter 1, Getting Started with Next-Generation Artifcial Intelligence through Reinforcement Learning, can be built.

Overall architecture

At this point, the overall architecture contains two main components:

  1. Chapter 1: A reinforcement learning program based on the value-action Q function using a reward matrix that will be finalized in this chapter. The reward matrix was provided in the first chapter as an experiment, but in the implementation phase, you'll often have to build it from scratch. It sometimes takes weeks to produce a good reward matrix.
  2. Chapter 2: Designing a set of 6×1 neurons that represents the flow of products at a...

Summary

Using a McCulloch-Pitts neuron with a logistic activation function in a one-layer network to build a reward matrix for reinforcement learning shows one way to preprocess a dataset.

Processing real-life data often requires a generalization of a logistic sigmoid function through a softmax function, and a one-hot function applied to logits to encode the data.

Machine learning functions are tools that must be understood to be able to use all or parts of them to solve a problem. With this practical approach to artificial intelligence, a whole world of projects awaits you.

This neuronal approach is the parent of the multilayer perceptron that will be introduced starting in Chapter 8, Solving the XOR Problem with a Feedforward Neural Network.

This chapter went from an experimental black box machine learning and deep learning to white box implementation. Implementation requires a full understanding of machine learning algorithms that often require fine-tuning.

...

Questions

  1. Raw data can be the input to a neuron and transformed with weights. (Yes | No)
  2. Does a neuron require a threshold? (Yes | No)
  3. A logistic sigmoid activation function makes the sum of the weights larger. (Yes | No)
  4. A McCulloch-Pitts neuron sums the weights of its inputs. (Yes | No)
  5. A logistic sigmoid function is a log10 operation. (Yes | No)
  6. A logistic softmax is not necessary if a logistic sigmoid function is applied to a vector. (Yes | No)
  7. A probability is a value between –1 and 1. (Yes | No)

Further reading

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • AI-based examples to guide you in designing and implementing machine intelligence
  • Build machine intelligence from scratch using artificial intelligence examples
  • Develop machine intelligence from scratch using real artificial intelligence

Description

AI has the potential to replicate humans in every field. Artificial Intelligence By Example, Second Edition serves as a starting point for you to understand how AI is built, with the help of intriguing and exciting examples. This book will make you an adaptive thinker and help you apply concepts to real-world scenarios. Using some of the most interesting AI examples, right from computer programs such as a simple chess engine to cognitive chatbots, you will learn how to tackle the machine you are competing with. You will study some of the most advanced machine learning models, understand how to apply AI to blockchain and Internet of Things (IoT), and develop emotional quotient in chatbots using neural networks such as recurrent neural networks (RNNs) and convolutional neural networks (CNNs). This edition also has new examples for hybrid neural networks, combining reinforcement learning (RL) and deep learning (DL), chained algorithms, combining unsupervised learning with decision trees, random forests, combining DL and genetic algorithms, conversational user interfaces (CUI) for chatbots, neuromorphic computing, and quantum computing. By the end of this book, you will understand the fundamentals of AI and have worked through a number of examples that will help you develop your AI solutions.

Who is this book for?

Developers and those interested in AI, who want to understand the fundamentals of Artificial Intelligence and implement them practically. Prior experience with Python programming and statistical knowledge is essential to make the most out of this book.

What you will learn

  • Apply k-nearest neighbors (KNN) to language translations and explore the opportunities in Google Translate
  • Understand chained algorithms combining unsupervised learning with decision trees
  • Solve the XOR problem with feedforward neural networks (FNN) and build its architecture to represent a data flow graph
  • Learn about meta learning models with hybrid neural networks
  • Create a chatbot and optimize its emotional intelligence deficiencies with tools such as Small Talk and data logging
  • Building conversational user interfaces (CUI) for chatbots
  • Writing genetic algorithms that optimize deep learning neural networks
  • Build quantum computing circuits

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Feb 28, 2020
Length: 578 pages
Edition : 2nd
Language : English
ISBN-13 : 9781839212819
Category :
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning

Product Details

Publication date : Feb 28, 2020
Length: 578 pages
Edition : 2nd
Language : English
ISBN-13 : 9781839212819
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 142.97
Artificial Intelligence By Example
$43.99
Artificial Intelligence with Python
$54.99
Artificial Intelligence with Python Cookbook
$43.99
Total $ 142.97 Stars icon

Table of Contents

22 Chapters
Getting Started with Next-Generation Artificial Intelligence through Reinforcement Learning Chevron down icon Chevron up icon
Building a Reward Matrix – Designing Your Datasets Chevron down icon Chevron up icon
Machine Intelligence – Evaluation Functions and Numerical Convergence Chevron down icon Chevron up icon
Optimizing Your Solutions with K-Means Clustering Chevron down icon Chevron up icon
How to Use Decision Trees to Enhance K-Means Clustering Chevron down icon Chevron up icon
Innovating AI with Google Translate Chevron down icon Chevron up icon
Optimizing Blockchains with Naive Bayes Chevron down icon Chevron up icon
Solving the XOR Problem with a Feedforward Neural Network Chevron down icon Chevron up icon
Abstract Image Classification with Convolutional Neural Networks (CNNs) Chevron down icon Chevron up icon
Conceptual Representation Learning Chevron down icon Chevron up icon
Combining Reinforcement Learning and Deep Learning Chevron down icon Chevron up icon
AI and the Internet of Things (IoT) Chevron down icon Chevron up icon
Visualizing Networks with TensorFlow 2.x and TensorBoard Chevron down icon Chevron up icon
Preparing the Input of Chatbots with Restricted Boltzmann Machines (RBMs) and Principal Component Analysis (PCA) Chevron down icon Chevron up icon
Setting Up a Cognitive NLP UI/CUI Chatbot Chevron down icon Chevron up icon
Improving the Emotional Intelligence Deficiencies of Chatbots Chevron down icon Chevron up icon
Genetic Algorithms in Hybrid Neural Networks Chevron down icon Chevron up icon
Neuromorphic Computing Chevron down icon Chevron up icon
Quantum Computing Chevron down icon Chevron up icon
Answers to the Questions Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Most Recent
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6
(17 Ratings)
5 star 76.5%
4 star 11.8%
3 star 11.8%
2 star 0%
1 star 0%
Filter icon Filter
Most Recent

Filter reviews by




SR_WA Dec 01, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is one of the best authored books on ai.The explanation flows well making it easy to understand.
Amazon Verified review Amazon
Tamzid Bhuiyan May 19, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
information are helpful , good for students
Amazon Verified review Amazon
hawkinflight Jul 18, 2020
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
I was very interested in looking at this book for the last two chapters - Neuromorphic Computing (NC) and Quantum Computing (QC). I knew nothing about NC, and I have been studying QC. I have some background with machine learning. I found these two chapters to be very fun, informative and easy to read.From the Neuromorphic Computing chapter I learned that Intel Research is working on a neurocomputing chip, containing hundreds to thousands of neurons, and that those chips could be connected to make a network. Given that there are 100 billion neurons in a human brain, it would take a huge number of chips to be equivalent. Neurocomputing software, Nengo, is mentioned, which I found interesting, also in the Further Reading section a book written by the author of Nengo is mentioned which describes "how to build a brain". In the chapter, a distinction is made between the neuromorphic computing approach and neural nets. It is also mentioned that Google's TPU is a specialized chip, that is, hardware designed to work well with the TensorFlow software, and that we can expect more of this in the future.The Quantum Computing chapter is brief, but nice in that it gives a quick introduction, and connects with the previous chapter, Neuromorphic Computing. It is mentioned that in the future, a quantum computer could represent a brain, which could be called from a classical computer. A nice, quick, back-of-the-napkin like calculation is done to demonstrate the difference between linear (classical) and exponential (quantum) growth. The author gives an example of a quantum algorithm he wrote which processes some data and seems to return a number which could be interpreted as a movie "recommended" or not. There's not enough description, I think, of the gates applied to get a good feel about what was done and why, but it's nice in that it's really "to the point". Quantum algorithms seem like a pretty hard topic, but this example is motivating, causing me to think - hey, that sounds neat, it's different from what I had been thinking, what is quantum ML like? and, to seek out other sources on the topic.Finally, at the end of the book there is a section - Answers to the Questions, which were asked at the end of each chapter. I enjoyed reading through these to test myself and check the answers against my thoughts. I liked reading the sections about: 1) the self-driving vehicles, which included a challenge question - would you like to design an autonomous driving system for your city? 2) adding emotional intelligence to chat bots 3) combining methods, for example, reinforcement learning + deep learning, decision trees + k-means clustering, genetic algorithms + neural nets.The author is very bullish on quantum computers, though there is no guarantee that QC's can be developed to the point of being functional, for a real problem. I too, however, am optimistic. Via the chapter questions and answers, the author does comment on what existing systems cannot do today; for example, that there currently is no "general AI", like a human, but instead, just "narrow AI", as in, specific tasks only.I like the breadth.
Amazon Verified review Amazon
siebo Jun 02, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book took me much deeper on my journey into AI and ML. It takes you through a series and algos and sub-disciplines of Machine Learning explaining each one in a way that is both thorough and concise. It does a good job of instilling the problem solving and modeling process that is necessary to design and implement different approaches. The examples are much like what you are likely to encounter in professional settings rather than the "toy" apps that some books use as examples. Coming from a Python background, I found the code samples very approachable. My statistics background is not as strong, so for some of the concepts, I had to do a bit of side reading to get up to speed. The authors writing style is clear and straightforward, combined with how he narrates his thought process, it gave me a lot of confidence to work with these AI techniques.
Amazon Verified review Amazon
Trebor May 28, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
A topic such as AI is very complex and pretty difficult to describe, let alone in a single book. Most books cover purely from a theoretical explanation and others barely cover any theory and use pure use cases or examples to illustrate the properties of AI. This book seems to cover both very well. There are some interesting naming conventions and assumptions, but overall the book does accomplish what the title describes, you will learn AI by examples. Just the right balance of example and description.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.