0% found this document useful (0 votes)
22 views

ML Type

Uploaded by

Asif Nexus
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)
22 views

ML Type

Uploaded by

Asif Nexus
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/ 13

Different types of Machine Learning

Machine learning approaches include supervised and unsupervised learning. Both strategies are
employed in various contexts and with various datasets.

What is Supervised Machine Learning?


Supervised learning is a sort of machine learning in which machines are trained using
well-labeled training data and then predict the output based on that data. The labelled
data indicates that some of the input data has already been tagged with the appropriate
output.

In supervised learning, the training data presented to the machines acts as a supervisor,
instructing the machines on how to correctly predict the output. It uses the same notion
as when a student learns under the guidance of a teacher. The process of supplying input
data as well as proper output data to the machine learning model is known as supervised
learning. A supervised learning algorithm's goal is to discover a mapping function that
will map the input variable(x) to the output variable(y).

Supervised learning can be utilized in the real world for things like risk assessment,
image categorization, fraud detection, spam filtering, and so forth.

How Supervised Learning Works?


Models are trained using a labelled dataset in supervised learning, where the model learns
about each category of input. The model is tested using test data (a subset of the training
set) when the training phase is completed, and it then predicts the output.

The following example and diagram will help you understand how supervised learning
works:
Assume we have a dataset with a variety of forms, such as squares, rectangles, triangles,
and polygons. The model must now be trained for each shape as the initial phase.

• If a given shape has four sides and all of them are equal, it is referred to as
a Square .
• The supplied shape will be labeled as a triangle if it has three sides .
• When a form has six equal sides, it is referred to as a hexagon .

After training, we use the test set to put our model to the test, and the model's objective
is to recognize the shape.

The system has already been trained on a variety of forms, so when it encounters a new
one, it classifies it based on a number of sides and predicts the outcome.

Steps Involved in Supervised Learning:


• First Determine the type of training dataset
• Collect/Gather the labelled training data.
• Split the training dataset into training dataset, test dataset, and validation dataset.
• Determine the input features of the training dataset, which should have enough
knowledge so that the model can accurately predict the output.
• Determine the suitable algorithm for the model, such as support vector machine,
decision tree, etc.
• Execute the algorithm on the training dataset. Sometimes we need validation sets
as the control parameters, which are the subset of training datasets.
• Evaluate the accuracy of the model by providing the test set. If the model predicts
the correct output, which means our model is accurate.

Types of supervised Machine learning Algorithms:

1. Regression
If there is a relationship between the input and output variables, regression procedures
are applied. It's used to predict continuous variables like weather forecasting, market
trends, and so on. Some popular supervised learning regression algorithms are listed
below:

• Linear Regression
• Regression Trees
• Non-Linear Regression
• Bayesian Linear Regression
• Polynomial Regression

2. Classification
When the output variable is categorical, meaning there are two classes, such as Yes-No,
Male-Female, True-False, and so on, classification methods are utilized.

Spam Filtering,

• Random Forest
• Decision Trees
• Logistic Regression
• Support vector Machines
Note: We will discuss these algorithms in detail in later chapters.

Difference between Regression Algorithm and Classification Algorithm

Regression Algorithm Classification Algorithm


The output variable in regression must be The output variable in classification must be a discrete
continuous or have a genuine value. value.
The regression algorithm's job is to map the The classification algorithm's job is to map the discrete
continuous output variable (y) to the input output variable to the input value(x) (y).
value (x) (y).
Continuous data is used with regression With discrete data, classification algorithms are applied.
algorithms.
In regression, we strive to identify the best fit We aim to find the decision boundary in classification to
line that can more accurately predict the divide the dataset into various classes.
output.
Weather prediction, house price prediction, Classification algorithms can be used to handle problems
and other regression problems can be solved like identifying spam emails, speech recognition, and
using regression algorithms. cancer cell identification, among others.
Linear and non-linear regression algorithms Binary Classifier and Multi-class Classifier are two types of
are two types of regression algorithms. classification algorithms.

Advantages of Supervised learning:


• The model can predict the result based on prior experiences thanks to supervised
learning.
• We can have a precise concept about the classes of things via supervised learning.
• We may use the supervised learning model to handle a variety of real-world
problems, such as fraud detection and spam filtering.

Disadvantages of supervised learning:


• Models of supervised learning are ineffective for dealing very complicated tasks.
• If the test data differs from the training dataset, supervised learning will not be
able to predict the proper output.
• Training necessitated a significant amount of computation time.
• In supervised learning, we must have a sufficient understanding of the object
classes.
What We learnt from Supervised Machine Learning?
We learnt supervised machine learning in the previous topic, which involves training
models with labeled data under the supervision of training data. However, there may be
times when we don't have labeled data and need to uncover hidden patterns in a dataset.
Unsupervised learning approaches are required to solve such problems in machine
learning.

What is Unsupervised Learning?


Unsupervised learning is a machine learning technique in which models are not
supervised using a training dataset, as the name suggests. Models, on the other hand, use
the data to uncover hidden patterns and insights. It is comparable to the learning that
occurs in the human brain while learning new things. It can be summed up as follows:

“Unsupervised learning is a type of machine learning in which models are trained


using unlabeled dataset and are allowed to act on that data without any supervision.”

Because, unlike supervised learning, we have the input data but no corresponding output
data, unsupervised learning cannot be immediately applied to a regression or
classification task. Unsupervised learning aims to uncover a dataset's underlying structure,
categorize data based on similarities, and display the dataset in a compact fashion.

Consider the following scenario: the unsupervised learning system is given an input
dataset containing photographs of various cats and dogs. The algorithm is never trained
on the given dataset, therefore it has no knowledge what the dataset's characteristics are.
The unsupervised learning algorithm's job is to find the image features on their own. This
work will be completed by using an unsupervised learning algorithm to cluster the image
dataset into groups based on image similarities.
Why use Unsupervised Learning?
The following are some of the most important arguments for the relevance of
unsupervised learning:

• Unsupervised learning is beneficial for extracting relevant information from data.


• Unsupervised learning is analogous to how a human learns to think via their own
experiences, bringing it closer to true AI.
• Because unsupervised learning works with unlabeled and uncategorized data, it is
more important.
• In the real world, we don't always have input data that corresponds to output data,
hence we require unsupervised learning to handle these problems.

Working of Unsupervised Learning


Working of unsupervised learning can be understood by the below diagram:
We've used unlabeled input data, which means it hasn't been categorized and no outputs
have been provided. Now, the machine learning model is fed this unlabeled input data in
order to train it. It will first analyze the raw data in order to uncover hidden patterns, and
then use appropriate algorithms such as k-means clustering, Decision tree, and so on.

After applying the appropriate method, the algorithm splits the data objects into groups
based on their similarities and differences.

Types of Unsupervised Learning Algorithm:


The unsupervised learning algorithm can be further categorized into two types of
problems: Clustering: Clustering is a way of organizing things into clusters so that those
with the most similarities stay in one group while those with less or no similarities stay in
another. Cluster analysis identifies commonalities among data objects and classifies them
according to the presence or absence of such commonalities.

Association: An association rule is an unsupervised learning strategy that is used to


discover links between variables in a large database. It identifies the group of items that
appear in the dataset together. The association rule improves the effectiveness of
marketing strategies. People who buy X item (say, bread) are more likely to buy Y
(Butter/Jam) item.
Note: We will learn these algorithms in later chapters.

Unsupervised Learning algorithms:


The list of some popular unsupervised learning algorithms are given below:

• K-means clustering
• KNN (k-nearest neighbors)
• Hierarchal clustering
• Anomaly detection
• Neural Networks
• Principle Component Analysis
• Independent Component Analysis
• Apriori algorithm
• Singular value decomposition

Advantages of Unsupervised Learning


• Unsupervised learning is utilized for more complex problems than supervised
learning because there is no labeled input data in unsupervised learning.
• Unsupervised learning is preferred because unlabeled data is easier to obtain than
labeled data.

Disadvantages of Unsupervised Learning


• Because it lacks a comparable output, unsupervised learning is inherently more
challenging than supervised learning.
• Because the input data is not labeled and algorithms do not know the exact output
in advance, the result of an unsupervised learning algorithm may be less accurate.

Differences between Supervised and Unsupervised Machine


Learning
Supervised Machine Learning:
Supervised learning is a machine learning technique that involves training models with
labeled data. Models in supervised learning must discover a mapping function to connect
the input variable (X) to the output variable (Y).

Machine learning that is supervised


To train the model, supervised learning requires supervision, similar to how a student
learns in the presence of a teacher. There are two sorts of issues that can be solved with
supervised learning: classification and regression.

Y = f(X)

Example: we have an image of many sorts of fruits. Our supervised learning model's job
is to recognize the fruits and classify them appropriately. So, in order to recognize a
picture in supervised learning, we'll provide both input and output data, which means
we'll train the model based on the form, size, color, and taste of each fruit. After the
training, we'll put the model to the test by feeding it a new batch of fruits. The model will
recognize the fruit and, using a suitable algorithm, predict the outcome.

Unsupervised Machine Learning:


Unsupervised learning is another machine learning method that uses unlabeled input data
to discover patterns. Unsupervised learning aims to extract structure and patterns from
unstructured data. There is no need for monitoring when learning unsupervised. Instead,
it searches the data for patterns on its own. Clustering and Association are two sorts of
issues that can be solved using unsupervised learning.

We will use the example presented above to better understand unsupervised learning. In
contrast to supervised learning, we shall not give any supervision to the model in this case.
We will simply feed the model with the input dataset and let it detect patterns in the data.
With the help of a suitable algorithm, the model will train itself and divide the fruits into
different groups according to the most similar features between them.

Differences:

Supervised Learning Unsupervised Learning


Labeled data is used to train supervised Unsupervised learning algorithms are taught
learning algorithms. on data that hasn't been labeled.
The supervised learning model uses direct There is no feedback in the unsupervised
feedback to determine whether it is correctly learning paradigm.
anticipating output.
The outcome is predicted by a supervised The data is analyzed using an unsupervised
learning model. learning model to uncover hidden patterns.
In supervised learning, the model receives both Only input data is presented to the model in
input and output data. unsupervised learning.
The purpose of supervised learning is to train Unsupervised learning aims to uncover hidden
the model to predict the outcome when new patterns and meaningful insights in an
data is provided. unknown dataset.
To train the model, supervised learning is To train the model, unsupervised learning does
required. not require any supervision.
Classification and regression issues are two Clustering and Associations issues are two
types of supervised learning tasks. types of unsupervised learning tasks.
When we know both the input and the outputs, When there is only input data and no
we can apply supervised learning. corresponding output data, unsupervised
learning can be applied.
The supervised learning model yields a precise When compared to supervised learning, the
output. unsupervised learning model may produce less
accurate results.
Supervised learning is nowhere near to actual Unsupervised learning is closer to actual
Artificial Intelligence because it requires us to Artificial Intelligence since it learns in the same
train the model for each piece of data before it way that a toddler learns from his experiences.
can anticipate the correct outcome.
Linear Regression, Logistic Regression, Support Clustering, KNN, and the Apriori algorithm are
Vector Machine, Multi-class Classification, among the algorithms included.
Decision Tree, Bayesian Logic, and more
algorithms are included.
What is Semi-Supervised Learning?
Semi-Supervised learning is a type of Machine Learning algorithm that represents
the intermediate ground between Supervised and Unsupervised learning algorithms.
It uses the combination of labeled and unlabeled datasets during the training period.

You should be familiar with the key categories of Machine Learning algorithms before
diving into Semi-Supervised Learning. Supervised Learning, Unsupervised Learning, and
Reinforcement Learning are the three main types of machine learning. Furthermore, the
primary distinction between supervised and unsupervised learning datasets is that
supervised datasets include output label training data for each tuple, but unsupervised
datasets do not. Between supervised and unsupervised machine learning, semi-
supervised learning is an important category. Although semi-supervised learning acts on
data with a few labels and is the middle ground between supervised and unsupervised
learning, it largely consists of unlabeled data. Labels are expensive, yet for corporate
purposes, a few labels may suffice.

The primary downside of supervised learning is that it necessitates manual labeling by


machine learning experts or data scientists, as well as a high processing cost. Furthermore,
the range of applications for unsupervised learning is limited. The notion of semi-
supervised learning is introduced to solve the shortcomings of supervised and
unsupervised learning algorithms. The training data in this algorithm is a mix of labeled
and unlabeled data. However, there is a very little amount of labeled data compared to
the vast amount of unlabeled data. Similar data is first clustered using an unsupervised
learning technique, which then aids in labeling unlabeled data into labeled data. It is for
this reason that labeled data is more expensive to acquire than unlabeled data.
With the help of an example, we can visualize these algorithms. At home and in college,
supervised learning refers to when a student is under the supervision of an instructor.
Unsupervised learning occurs when a learner self-analyzes the same subject without the
assistance of the instructor. In semi-supervised learning, the learner must revise after
evaluating the same subject with the help of a college instructor.

Assumptions followed by Semi-Supervised Learning


There must be a relationship between the objects in order to work with the unlabeled
dataset. Semi-supervised learning is based on one or more of the following assumptions:

• Continuity Assumption: According to the continuity assumption, things that are


close together are more likely to belong to the same group or category. This
assumption is also utilized in supervised learning, with decision boundaries
separating the datasets. The decision boundaries are combined with the
smoothness assumption in low-density boundaries in semi-supervised learning.
• Cluster assumptions: Data is separated into discrete clusters in this assumption.
Furthermore, the output label is shared by all points in the same cluster.
• Manifold assumptions: This assumption aids in the utilization of distances and
densities, and these data are distributed on a manifold with less dimensions than
the input space.
• The dimensional data is generated via a process with fewer degrees of freedom,
making it difficult to model directly. (If the probability is high, this assumption
becomes feasible.)

Working of Semi-Supervised Learning


Semi-supervised learning, unlike supervised learning, uses pseudo labeling to train the
model using less labeled training data. Various neural network models and training
methods can be combined in this process. The following points will illustrate how semi-
supervised learning works:

• To begin with, it trains the model with a less amount of training data than
supervised learning models. The model is trained until it produces correct results.
• In the next stage, the algorithms employ the unlabeled dataset with pseudo labels,
and the output may no longer be correct.
• The pseudo labels data and the labels from labeled training data are now linked.
• In addition, the input data in labeled and unlabeled training data are linked.
• Finally, like in the previous phase, retrain the model with the new combined input.
It will reduce errors and increase the model's accuracy.
Difference between Semi-supervised and Reinforcement
Learning
Reinforcement learning differs from semi-supervised learning in that it uses rewards and
feedback to motivate students. Reinforcement learning aims to maximize the rewards
by their hit and trial actions, whereas in semi-supervised learning, we train the
model with a less labeled dataset.

Real-world applications of Semi-supervised Learning


In the industry, semi-supervised learning models are becoming more common. The
following are some of the most common applications.

• Speech analysis: It is the most well-known use of semi-supervised learning.


Because classifying audio data is the most difficult operation that necessitates a
large number of human resources, this problem can be naturally solved by using
SSL in a semi-supervised learning model.
• Web content classification: However, labeling each page on the internet is
extremely important and impossible because it requires significant human
interaction. Even yet, using Semi-Supervised Learning Algorithms, this problem can
be mitigated. Furthermore, Google ranks a webpage for a particular query using
semi-supervised learning algorithms.
• Protein sequence classification: because DNA strands are longer, significant
human intervention is required. In this field, the rise of the semi-supervised model
has been close.
• Text document classifier: As we all know, finding a significant amount of labeled
text data is nearly impossible, therefore semi-supervised learning is a great way to
get around this.

You might also like