Artificial intelligence

Artificial intelligence (AI) is a field of science and engineering that aims to develop intelligent machines that think and act like humans. These machines can mimic human behavior and perform tasks through learning and problem-solving.

The most popular definitions of AI are as follows:

  • “A computer system able to perform tasks that normally require human intelligence, such as visual perception, speech recognition, decision-making, and translation between languages [1].”

  • “The capability of machines to imitate intelligent human behavior [2].”

Press + to interact

Machine learning

Machine learning (ML) is a subset of AI that enables machines to learn automatically from data by identifying patterns. ML empowers computers to work autonomously without being explicitly programmed. ML algorithms are designed to extract useful information from large amounts of data by identifying patterns and relationships and by making decisions or predictions based on the provided data. The image below demonstrates how a machine can learn from data using algorithms.

Press + to interact
Demonstration of how machines can learn from data using machine learning
Demonstration of how machines can learn from data using machine learning

Here are some important features of machine learning:

  • It utilizes data to find patterns in a given dataset.

  • It can learn from previous data and improve its performance automatically.

  • It’s a data-driven technology.

Machine learning process

The machine learning process consists of seven major steps, illustrated in the figure below.

Press + to interact
The seven major steps in the machine learning process
The seven major steps in the machine learning process

Types of machine learning

Machine learning can be further categorized into three types: supervised learning, unsupervised learning, and reinforcement learning.

Press + to interact
Types of machine learning
Types of machine learning

Machine learning applications

The following figure shows the prominent application of ML in a wide range of fields:

Press + to interact
Popular applications of machine learning in different fields
Popular applications of machine learning in different fields

Deep learning

Deep learning (DL) is a subset of ML that employs algorithms inspired by the human brain’s structure and function. In particular, DL is based on neural networks, whose architecture is also inspired by the human brain. The word deep implies that several layers are used in the neural networks. DL uses massive structured and unstructured data to train models to detect or predict the desired results. One key advantage of DL is its ability to extract features from data automatically.

DL models have numerous applications, such as image classification, text classification, recommendation systems, self-driving cars, voice recognition, and more.

The basic structure of deep learning

The basic architecture of a DL model is as follows:

  • Input layer: This layer accepts input data and passes it to the next layer for processing.

  • Hidden layer: Lying between the input and output layer, each of these layers is made up of many nodes, which are also known as neurons. These nodes receive input from the previous layer and then process it in order to generate output to deliver to the next layer.

  • Output layer: The output layer shows the predicted output. The number of nodes in the output layer depends on the number of classes in the data.

Each layer in a DL model is typically made up of a large number of neurons, which are interconnected and use mathematical operations to process data. The neurons in one layer are connected to the neurons in the next layer, and the weights of these connections are learned during training using optimization techniques.

Types of deep learning

The figure below represents the most commonly used types of DL:

Press + to interact
Types of deep learning
Types of deep learning

Applications of deep learning

The following image showcases popular applications of deep learning:

Press + to interact
Applications of deep learning
Applications of deep learning

Supervised learning

Supervised learning is a type of machine learning in which the models are trained using labeled datasets. It’s widely used in various applications such as image classification, voice recognition, natural language processing, fraud detection, etc.

How supervised learning works

In supervised learning, the model is trained using labeled data. Once the model is trained, it is then tested on new data instances in order to check its accuracy.

Press + to interact
 Illustration of the supervised learning process
Illustration of the supervised learning process

For example, suppose we have a dataset of various fruits, such as apples, oranges, and bananas. The first step of the supervised learning process is to train the ML model. A trained model can identify the distinguished features of each category in a dataset. In this case, the features can be shape, size, and color, as shown in the table below.

Fruit Dataset

Shape

Size

Color

Label/Target

Round in shape with a depression at the top

Big

Green-red

Apple

Round shape

Big

Orange

Orange

Long curved cylinder

Big

Yellow

Banana

The machine will learn features with the corresponding labels, as described below:

  • The machine will give an object the label “banana” if the shape of the object is long with a curved cylinder and a green-yellow color.

  • The machine will give an object the label "apple" if the shape of the object is round with depression at the top and has a red color.

After training, the model is validated using test data to check its performance.

Supervised learning is used to solve two problems: regression and classification.

Regression

Regression predicts continuous output in a value, such as in “house price” or “temperature,” for example. In particular, it identifies the relationship between a dependent variable (the target variable) and one or more independent variables (the features). Regression is achieved using the techniques given in the figure below:

Press + to interact
Popular techniques to achieve regression
Popular techniques to achieve regression

Classification

Classification predicts the correct label of given input data based on its features. For example, a classification model is trained to predict if an email is spam based on the content (features). Such classification is mostly achieved by the techniques shown in the diagram below:

Press + to interact
Popular techniques to achieve classification
Popular techniques to achieve classification

Unsupervised learning

Unsupervised learning is another type of ML in which the model is trained using unlabeled data. It’s used to sort the information into several groups based on similarities and differences in features. It’s called unsupervised learning because the machine intends to find hidden patterns and structures from the unlabeled data. Machines have no guidance (labels) to distinguish between different data classes.

Press + to interact
 Illustration of the unsupervised learning process
Illustration of the unsupervised learning process

For example, if the provided dataset contains different fruits that are never seen by the machine, then the machines cannot classify different types of fruits directly because they do not know their labels. However, the fruits can still be classified into several groups (clusters) based on their features.

Summary

It should be noted that the terms artificial intelligence (AI), machine learning (ML), and deep learning (DL) are frequently used interchangeably and can be confusing. In short, AI is the general concept responsible for creating human intelligence in machines. Meanwhile, ML enables machines to learn automatically from data-identifying patterns without being explicitly programmed, and DL depends on massive data and several layers in the neural network.

Press + to interact

Supervised and unsupervised learning are two different approaches to machine learning, each with their own strengths and weaknesses. In supervised learning, the model is trained using labeled data in which the desired output is known. This approach is useful in classification and regression problems, where the goal is to predict output based on input features. In contrast, unsupervised learning is used when the data is not labeled, in which case the model finds patterns from the data and divides it into groups based on features.

While supervised and unsupervised learning have unique advantages and are suitable for different tasks, we will solely focus on supervised learning in this course. The choice between supervised and unsupervised learning depends on the task and type of data available. Depending on your objectives, select the appropriate approach by properly understanding the difference between these fields, which will help you achieve the desired outcomes for your projects.

References

[1] Russell, Stuart and Norvig Peter, Artificial Intelligence: A Modern Approach (Prentice Hall, 2009).

[2] Poole, D., and Mackworth, A., Artificial Intelligence: Foundations of Computational AgentsCambridge University Press, 2017).