[go: up one dir, main page]

0% found this document useful (0 votes)
13 views9 pages

Chapter 5 Machine Learning Basics

Chapter 5 introduces the basics of machine learning, explaining how machines can learn from data and improve their performance. It classifies machine learning into three types: supervised, unsupervised, and reinforcement learning, detailing their methodologies and algorithms. Additionally, it covers deep learning and its implementation through artificial neural networks, highlighting different types such as recurrent and convolutional neural networks.

Uploaded by

moyibersisa18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views9 pages

Chapter 5 Machine Learning Basics

Chapter 5 introduces the basics of machine learning, explaining how machines can learn from data and improve their performance. It classifies machine learning into three types: supervised, unsupervised, and reinforcement learning, detailing their methodologies and algorithms. Additionally, it covers deep learning and its implementation through artificial neural networks, highlighting different types such as recurrent and convolutional neural networks.

Uploaded by

moyibersisa18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Chapter 5: Machine Learning Basics

5.1 Introduction
In the real world, we are surrounded by humans who can learn everything from their
experiences with their learning capability, and we have computers or machines which
work on our instructions. But can a machine also learn from experiences or past data
like a human does? So here comes the role of Machine Learning.

Machine learning enables a machine to automatically learn from data, improve


performance from experiences, and predict things without being explicitly programmed.
A Machine Learning system learns from historical data, builds the prediction models,
and whenever it receives new data, predicts the output for it. The accuracy of predicted
output depends upon the amount of data, as the huge amount of data helps to build a
better model which predicts the output more accurately.

1
5.2 Classification of Machine Learning
At a broad level, machine learning can be classified into three types:
 Supervised learning
 Unsupervised learning
 Reinforcement learning

5.2.1 Supervised Machine Learning


Supervised learning is the types of machine learning in which machines are trained
using well "labeled" training data, and on basis of that data, machines predict the
output. The labeled data means some input data is already tagged with the correct
output.
How Supervised Learning Works?
In supervised learning, models are trained using labeled dataset, where the model
learns about each type of data. Once the training process is completed, the model is
tested on the basis of test data (a subset of the training set), and then it predicts the
output.
The working of Supervised learning can be easily understood by the below example and
diagram:

2
Suppose we have a dataset of different types of shapes which includes square,
rectangle, triangle, and Polygon. Now the first step is that we need to train the model for
each shape.
 If the given shape has four sides, and all the sides are equal, then it will be
labeled as a Square.
 If the given shape has three sides, then it will be labeled as a triangle.
 If the given shape has six equal sides then it will be labeled as hexagon.
Now, after training, we test our model using the test set, and the task of the model is to
identify the shape.
The machine is already trained on all types of shapes, and when it finds a new shape, it
classifies the shape on the bases of a number of sides, and predicts the output.

Types of supervised Machine learning Algorithm


Supervised learning can be further divided into two types of problems:

3
A. Regression
Regression algorithms are used if there is a relationship between the input variable and
the output variable. It is used for the prediction of continuous variables, such as
Weather forecasting, Market Trends, etc. Below are some popular Regression
algorithms which come under supervised learning:
 Linear Regression
 Regression Trees
 Non-Linear Regression
 Bayesian Linear Regression
 Polynomial Regression
B. Classification
Classification algorithms are used when the output variable is categorical, which means
there are two classes such as Yes-No, Male-Female, True-false, etc. Below are some
popular Regression algorithms which come under supervised learning:
 Random Forest
 Decision Trees
 Logistic Regression
 Support vector Machines
5.2.2 Unsupervised Learning
As the name suggests, unsupervised learning is a machine learning technique in which
models are not supervised using training dataset. Instead, models itself find the hidden
patterns and insights from the given data.
The training is provided to the machine with the set of data that has not been labeled,
and the algorithm restructures the input data into new features or a group of objects with
similar patterns.
Working of unsupervised learning can be understood by the below diagram:
Here, we have taken an unlabeled input data, which means it is not categorized and
corresponding outputs are also not given. Now, this unlabeled input data is fed to the
machine learning model in order to train it. Firstly, it will interpret the raw data to find the
hidden patterns from the data and then will apply suitable algorithms such as k-means
clustering, Decision tree, etc.

4
Once it applies the suitable algorithm, the algorithm divides the data objects into groups
according to the similarities and difference between the objects.

Types of Unsupervised Learning Algorithm:


The unsupervised learning algorithm can be further categorized into two types of
problems:

A. Clustering
Clustering is a method of grouping the objects into clusters such that objects with most
similarities remains into a group and has less or no similarities with the objects of
another group.
B. Association
An association rule is an unsupervised learning method which is used for finding the
relationships between variables in the large database. It determines the set of items
that occurs together in the dataset.

5
Such as people who buy X item (suppose a bread) are also tend to purchase Y (Butter)
item.

Unsupervised Learning algorithms:


Below is the list of some popular unsupervised learning algorithms:
 K-means clustering
 KNN (k-nearest neighbors)
 Hierarchal clustering
 Anomaly detection
 Neural Networks
 Principle Component Analysis
 Independent Component Analysis
 Apriori algorithm
 Singular value decomposition

5.2.3 Reinforcement Learning


Reinforcement Learning is a feedback-based Machine learning technique in which an
agent learns to behave in an environment by performing the actions and seeing the
results of actions. For each good action, the agent gets positive feedback or reward,
and for each bad action, the agent gets negative feedback or penalty.
In Reinforcement Learning, the agent learns automatically using feedbacks without any
labeled data, unlike supervised learning. Since there is no labeled data, so the agent is
bound to learn by its experience only.

6
The primary goal of an agent in reinforcement learning is to improve the performance by
getting the maximum positive rewards.
RL solves a specific type of problem where decision making is sequential, and the goal
is long-term, such as game-playing, robotics, etc.
Reinforcement Learning Algorithms
 Q-Learning
 State Action Reward State action (SARSA)
 Deep Q Neural Network (DQN)
5.3 Deep Learning
Deep learning is a type of machine learning and artificial intelligence (AI) that imitates
the way humans gain certain types of knowledge. Deep learning is implemented with
the help of Neural Networks, and the idea behind the motivation of Neural Network is
the biological neurons, which is a brain cell.
Artificial Neural Network
Artificial neural networks are computing systems inspired by the biological neural
networks that constitute animal brains. Similar to the human brain that has neurons
interconnected to one another; artificial neural networks also have neurons that are
interconnected to one another in various layers of the networks. These neurons are
known as nodes.
Relationship between Biological neural network and artificial neural network:

Artificial Neural Network primarily consists of three layers:


 Input Layer: accepts inputs in several different formats

7
 Hidden Layer: presents in-between input and output layers. It performs all the
calculations to find hidden features and patterns.
 Output Layer: The input goes through a series of transformations using the
hidden layer, which finally results in output that is conveyed using this layer.

While a neural network with a single layer can still make approximate predictions,
additional hidden layers can help to optimize and refine for accuracy.
In forward propagation – Neural networks consist of multiple layers of interconnected
nodes, each building upon the previous layer to refine and optimize the prediction or
categorization.
In Back propagation – algorithms calculate errors in predictions and then adjust the
weights and biases of the function by moving backwards through the layers in an effort
to train the model. Over time, the algorithm becomes gradually more accurate.
5.3.1 Types of Deep Learning
Recurrent Neural Network
In Recurrent neural networks, each of the neurons present in the hidden layers receives
an input with a specific delay in time. The Recurrent neural network mainly accesses

8
the preceding info of existing iterations. For example, to guess the succeeding word in
any sentence, one must have knowledge about the words that were previously used.
The problem with this recurrent neural network is that it has slow computational speed
as well as it does not contemplate any future input for the current state. It typically used
in natural language and speech recognition applications as it leverages sequential or
times series data.
Convolutional Neural Network
Convolutional Neural Networks are a special kind of neural network mainly used for
image classification, clustering of images and object recognition. DNNs enable
unsupervised construction of hierarchical image representations. To achieve the best
accuracy, deep convolutional neural networks are preferred more than any other neural
network.

You might also like