Book Image

The Applied Artificial Intelligence Workshop

By : Anthony So, William So, Zsolt Nagy
Book Image

The Applied Artificial Intelligence Workshop

By: Anthony So, William So, Zsolt Nagy

Overview of this book

You already know that artificial intelligence (AI) and machine learning (ML) are present in many of the tools you use in your daily routine. But do you want to be able to create your own AI and ML models and develop your skills in these domains to kickstart your AI career? The Applied Artificial Intelligence Workshop gets you started with applying AI with the help of practical exercises and useful examples, all put together cleverly to help you gain the skills to transform your career. The book begins by teaching you how to predict outcomes using regression. You will then learn how to classify data using techniques such as k-nearest neighbor (KNN) and support vector machine (SVM) classifiers. As you progress, you’ll explore various decision trees by learning how to build a reliable decision tree model that can help your company find cars that clients are likely to buy. The final chapters will introduce you to deep learning and neural networks. Through various activities, such as predicting stock prices and recognizing handwritten digits, you’ll learn how to train and implement convolutional neural networks (CNNs) and recurrent neural networks (RNNs). By the end of this applied AI book, you’ll have learned how to predict outcomes and train neural networks and be able to use various techniques to develop AI and ML models.
Table of Contents (8 chapters)
Preface

Decision Trees

A decision tree has leaves, branches, and nodes. Nodes are where a decision is made. A decision tree consists of rules that we use to formulate a decision (or prediction) on the prediction of a data point.

Every node of the decision tree represents a feature, while every edge coming out of an internal node represents a possible value or a possible interval of values of the tree. Each leaf of the tree represents a label value of the tree.

This may sound complicated, but let's look at an application of this.

Suppose we have a dataset with the following features and the response variable is determining whether a person is creditworthy or not:

Figure 4.1: Sample dataset to formulate the rules

A decision tree, remember, is just a group of rules. Looking at the dataset in Figure 4.1, we can come up with the following rules:

  • All people with house loans are determined as creditworthy.
  • If debtors are employed and studying, then...