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

Machine Learning Types

The document provides information about machine learning including definitions of supervised and unsupervised learning. Supervised learning uses labeled training data to map inputs to known outputs while unsupervised learning discovers hidden patterns in unlabeled data. Examples of supervised learning algorithms include linear regression, logistic regression and decision trees. Unsupervised learning includes clustering and association.

Uploaded by

malikhaid3rali
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Machine Learning Types

The document provides information about machine learning including definitions of supervised and unsupervised learning. Supervised learning uses labeled training data to map inputs to known outputs while unsupervised learning discovers hidden patterns in unlabeled data. Examples of supervised learning algorithms include linear regression, logistic regression and decision trees. Unsupervised learning includes clustering and association.

Uploaded by

malikhaid3rali
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 30

Computer Science 9th

Chapter: 1
FUNDAMENTALS OF
COMPUTER

Instructor: Malik Haider Ali


Computer Science 9th

What is a computer ?
• Computer is an advanced electronic device that takes raw data as input
from the user and processes it under the control of instructions, gives the
result and saves it for the future use.
Computer Science 9th

MAIN POINTS OF DEFINITION :


• Machine Learning is an application of Artificial Intelligence that enables
systems to learn from vast volumes of data and solve specific problems. It
uses computer algorithms that improve their efficiency automatically
through experience.
Computer Science 9th

Types of Machine Learning


Computer Science 9th

Supervised Learning
• Supervised learning is a type of machine learning
that uses labeled data to train machine learning
models. In labeled data, the output is already
known. The model just needs to map the inputs to
the respective outputs.
• An example of supervised learning is to train a
system that identifies the image of an animal.
• Attached below, you can see that we have our
trained model that identifies the picture of a cat.
What is Supervised Learning?

• In Supervised Learning, the machine learns under supervision. It contains a


model that is able to predict with the help of a labeled dataset. A labeled
dataset is one where you already know the target answer.
• In this case, we have images that are labeled a spoon or a knife. This known
data is fed to the machine, which analyzes and learns the association of these
images based on its features such as shape, size, sharpness, etc. Now when a
new image is fed to the machine without any label, the machine is able to
predict accurately that it is a spoon with the help of the past data.
• Supervised learning can be further divided into two types:
• Classification
• Regression
Algorithms of Supervised ML
Some of the most popularly used supervised learning algorithms are:
• Linear Regression
• Logistic Regression
• Support Vector Machine
• K Nearest Neighbor
• Decision Tree
• Random Forest
• Naive Bayes
Working of Supervised ML
• Supervised learning algorithms take labeled inputs and map them to the
known outputs, which means you already know the target variable.
• Now, let’s focus on the training process for the supervised learning
method.
• Supervised Learning methods need external supervision to train machine
learning models. Hence, the name supervised. They need guidance and
additional information to return the desired result.
Types of Supervised ML

• Supervised learning algorithms are generally used for solving


classification and regression problems.
• Few of the top supervised learning applications are weather prediction,
sales forecasting, stock price analysis.
Regression in Machine Learning
• Regression is used when the output variable is a real or continuous value. In this case,
there is a relationship between two or more variables i.e., a change in one variable is
associated with a change in the other variable. For example, salary based on work
experience or weight based on height, etc.
• Regression finds correlations between dependent and independent variables. Therefore,
regression algorithms help predict continuous variables such as house prices, market
trends, weather patterns, oil and gas prices (a critical task these days!), etc.
• The Regression algorithm’s task is finding the mapping function so we can map the
input variable of “x” to the continuous output variable of “y.”
Example of Regression
• Let’s consider two variables - humidity and
temperature. Here, ‘temperature’ is the
independent variable and ‘humidity' is the
dependent variable. If the temperature
increases, then the humidity decreases.
• These two variables are fed to the model and
the machine learns the relationship between
them. After the machine is trained, it can
easily predict the humidity based on the
given temperature.
Classification in ML
• Classification is used when the output variable is categorical i.e. with 2 or more classes. For
example, yes or no, male or female, true or false, etc.
• In order to predict whether a mail is spam or not, we need to first teach the machine what a
spam mail is. This is done based on a lot of spam filters - reviewing the content of the mail,
reviewing the mail header, and then searching if it contains any false information. Certain
keywords and blacklist filters that blackmails are used from already blacklisted spammers.
• All of these features are used to score the mail and give it a spam score. The lower the total
spam score of the email, the more likely that it is not a scam.
• Based on the content, label, and the spam score of the new incoming mail, the algorithm
decides whether it should land in the inbox or spam folder.
Cont.
Classification in Machine Learning
• On the other hand, Classification is an algorithm that finds functions that help divide the dataset
into classes based on various parameters. When using a Classification algorithm, a computer
program gets taught on the training dataset and categorizes the data into various categories
depending on what it learned.
• Classification algorithms find the mapping function to map the “x” input to “y” discrete output.
The algorithms estimate discrete values (in other words, binary values such as 0 and 1, yes and
no, true or false, based on a particular set of independent variables. To put it another, more
straightforward way, classification algorithms predict an event occurrence probability by fitting
data to a logit function.
• Classification algorithms are used for things like email and spam classification, predicting the
willingness of bank customers to pay their loans, and identifying cancer tumor cells.
Regression Algorithms Classification Algorithms

The output variable must be either continuous nature or real


The output variable has to be a discrete value.
value.

The regression algorithm’s task is mapping input value (x) The classification algorithm’s task mapping the input value of x with the
with continuous output variable (y). discrete output variable of y.

They are used with continuous data. They are used with discrete data.

It attempt to find the best fit line, which predicts the output Classification tries to find the decision boundary, which divides the
more accurately. dataset into different classes.

Regression algorithms solve regression problems such as Classification algorithms solve classification problems like identifying
house price predictions and weather predictions. spam e-mails, spotting cancer cells, and speech recognition.

We can further divide Regression algorithms into Linear and We can further divide Classification algorithms into Binary Classifiers
Non-linear Regression. and Multi-class Classifiers.
When to Use Regression vs. Classification?

• We use Classification trees when the dataset must be divided into classes
that belong to the response variable. In most cases, those classes are “Yes”
or “No.” Thus, there are just two classes, and they are mutually exclusive.
Of course, there sometimes may be more than two classes, but we just use
a variant of the classification tree algorithm in those cases.
• However, we use Regression trees when we have continuous response
variables. For example, if the response variable is something like the
value of an object or today’s temperature, we use a Regression tree.
Real-Life Applications of Supervised Learning

Risk Assessment: Supervised learning is used to assess the risk in financial services or
insurance domains in order to minimize the risk portfolio of the companies.

Image Classification: Image classification is one of the key use cases of demonstrating
supervised machine learning. For example, Facebook can recognize your friend in a picture from
an album of tagged photos.

Fraud Detection: To identify whether the transactions made by the user are authentic or
not.

Visual Recognition: The ability of a machine learning model to identify objects, places,
people, actions, and images.
Unsupervised Learning
What is Unsupervised Learning?

• In Unsupervised Learning, the machine uses unlabeled data and learns on itself
without any supervision. The machine tries to find a pattern in the unlabeled data and
gives a response.
• Let's take a similar example is before, but this time we do not tell the machine whether
it's a spoon or a knife. The machine identifies patterns from the given set and groups
them based on their patterns, similarities, etc.
Unsupervised learning can be further grouped into types:
• Clustering
• Association
Clustering
Clustering - Unsupervised Learning
• Clustering is the method of dividing the objects into clusters that are similar between them and are
dissimilar to the objects belonging to another cluster. For example, finding out which customers made
similar product purchases.
• Suppose a telecom company wants to reduce its customer churn rate by providing personalized call
and data plans. The behavior of the customers is studied and the model segments the customers with
similar traits. Several strategies are adopted to minimize churn rate and maximize profit through
suitable promotions and campaigns.
• On the right side of the image, you can see a graph where customers are grouped. Group A customers
use more data and also have high call durations. Group B customers are heavy Internet users, while
Group C customers have high call duration. So, Group B will be given more data benefit plants, while
Group C will be given cheaper called call rate plans and group A will be given the benefit of both.
Association - Unsupervised Learning

• Association is a rule-based machine learning to discover the probability of


the co-occurrence of items in a collection. For example, finding out which
products were purchased together.
• Let’s say that a customer goes to a supermarket and buys bread, milk,
fruits, and wheat. Another customer comes and buys bread, milk, rice, and
butter. Now, when another customer comes, it is highly likely that if he
buys bread, he will buy milk too. Hence, a relationship is established
based on customer behavior and recommendations are made.
Association - Unsupervised Learning
Real-Life Applications of Unsupervised Learning

Identifying Accident Prone Areas: Unsupervised machine learning models can be used to
identify accident-prone areas and introduce safety measures based on the intensity of those
accidents.
Market Basket Analysis: It is a machine learning model based on the algorithm that if you
buy a certain group of items, you are less or more likely to buy another group of items.
Semantic Clustering: Semantically similar words share a similar context. People post
their queries on websites in their own ways. Semantic clustering groups all these responses
with the same meaning in a cluster to ensure that the customer finds the information they
want quickly and easily. It plays an important role in information retrieval, good browsing
experience, and comprehension.
Supervised learning Vs. Un-supervised Learning

Supervised Learning Unsupervised Learning

It uses known and labeled data as input It uses unlabeled data as input

It has a feedback mechanism It has no feedback mechanism

The most commonly used unsupervised learning


The most commonly used supervised learning algorithms are:
algorithms are:
• Decision tree
• K-means clustering
• Logistic regression
• Hierarchical clustering
• Support vector machine
• Apriori algorithm
Reinforcement Learning
• A chef explores different ingredients by exploring and experimenting with different
recipes in the hope of creating that perfect recipe that wows everyone. This is similar
to Reinforcement Learning, where the chef tries a variety of actions like trying
different ingredients in different proportions to progressively favors those that appear
to taste the best.
• In Reinforcement learning an agent interacts with the environment by sensing its state
and learns to take actions in order to maximize long-term reward. As the agent takes
actions it needs to maintain a balance between exploration and exploitation by
performing a variety of actions using trial and error to favor the actions that yield the
maximum reward in the future.
Cont.
• The goal of RL is for the agent to learn to make sequential decisions in an
uncertain environment by mapping the different environment states to
actions to maximize long-term rewards.
• The two main characteristics of RL are trial and error search and delayed
rewards like delayed gratification.
• Reinforcement learning is applied in Robotics, Self-driving cars,
evaluating trading strategies and adaptive controls.
Cont.
Additional ML algorithms
Semi-Supervised Learning
• Semi-Supervised learning combines supervised and unsupervised learning by training on a small
number of labeled data and a large unlabeled dataset to capture the shape of the underlying data
distribution and generalize better to new samples. This technique automates the data-labeling
process with only a small labeled dataset.
Evolutionary algorithms
• Evolutionary algorithms are inspired by nature to solve problems through processes that emulate
living organisms' biological evolutional behaviors. The genetic algorithm is inspired by
CharlesDarwin'ss theory of natural evolution. Simulated annealing is based on physical annealing to
minimize the system's energy. Examples of EA are Genetic algorithms, Swarm Intelligence, and Ant
Colony Optimization.
Thank You

You might also like