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

Random Forest Classifier

If you think about the name random forest classifier, it can be explained as follows:

  • A forest consists of multiple trees.
  • These trees can be used for classification.
  • Since the only tree we have used so far for classification is a decision tree, it makes sense that the random forest is a forest of decision trees.
  • The random nature of the trees means that our decision trees are constructed in a randomized manner.

Therefore, we will base our decision tree construction on information gain or Gini Impurity.

Once you understand these basic concepts, you essentially know what a random forest classifier is all about. The more trees you have in the forest, the more accurate prediction is going to be. When performing prediction, each tree performs classification. We collect the results, and the class that gets the most votes wins.

Random forests can be used for regression as well as for classification. When using random forests...