ML Type
ML Type
Machine learning approaches include supervised and unsupervised learning. Both strategies are
employed in various contexts and with various datasets.
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.
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.
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.
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:
After applying the appropriate method, the algorithm splits the data objects into groups
based on their similarities and differences.
• K-means clustering
• KNN (k-nearest neighbors)
• Hierarchal clustering
• Anomaly detection
• Neural Networks
• Principle Component Analysis
• Independent Component Analysis
• Apriori algorithm
• Singular value decomposition
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.
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:
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.
• 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.