Lesson 4 – Analytics Modeling (AP4)
▪ understood what supervised
learning is
▪ understood what classification
At the end of the is
lesson, students ▪ distinguished classification
must have” from regression
➢Supervised learning, also known as
supervised machine learning, is a
subcategory of machine
learning and artificial intelligence.
➢It is defined by its use of labeled
datasets to train algorithms to classify
data or predict outcomes accurately.
➢As input data is fed into the model, it adjusts its
weights until the model has been fitted
appropriately, which occurs as part of the
cross-validation process.
➢Give our model the corresponding correct
labels.
➢The model gets to look at which label
corresponds to our data and hence can find
patterns between our data and those labels.
▪ It classifies spam Detection by
teaching a model of what mail is
spam and not spam.
▪ Speech recognition where you teach
a machine to recognize your voice.
Some examples
of Supervised ▪ Object Recognition by showing a
machine what an object looks like
Learning:
and having it pick that object from
among other objects.
▪ It is the process of recognition,
understanding, and grouping of
objects and ideas into preset
categories a.k.a “sub-populations.”
▪ Classification in machine learning
What is programs leverage a wide range of
Classification? algorithms to classify future datasets
into respective and relevant
categories.
▪ Classification algorithms used in
machine learning utilize input training
data for the purpose of predicting
the likelihood or probability that the
data that follows will fall into one of
the predetermined categories.
What is
Common use of classification:
Classification? ▪ filtering emails into “spam” or “non-
spam”
➢Based on training data, the Classification
algorithm is a Supervised Learning technique used
to categorize new observations.
➢In classification, a program uses the dataset or
observations provided to learn how to categorize
new observations into various classes or groups.
Example:
0 or 1, red or blue, yes or no, spam or not spam,
etc
➢Targets, labels, or categories can all be used to
describe classes.
➢The Classification algorithm uses labeled input
data because it is a supervised learning technique
and comprises input and output information.
➢A discrete output function (y) is transferred to an
input variable in the classification process (x).
Lazy Learners
➢ It first stores the training dataset
before waiting for the test dataset to
arrive.
➢ When using a lazy learner, the
classification is carried out using the
training dataset's most appropriate
data.
➢ Less time is spent on training, but
more time is spent on predictions.
Example:
- Case-based reasoning
- KNN
Eager Learners
➢ Before obtaining a test dataset,
eager learners build a classification
model using a training dataset.
➢ They spend more time studying and
less time predicting.
Example:
- ANN
- naïve Bayes
- Decision trees
A classification problem in machine
learning is one in which a class label is
anticipated for a specific example of
input data.
Classification
Problems with categorization include
Predictive
the following:
Modeling ➢ Give an example and indicate
whether it is spam or not.
Problems with categorization include
the following:
➢ Identify a handwritten character as
one of the recognized characters.
Classification ➢ Determine whether to label the
current user behavior as churn.
Predictive
Modeling
1. Binary ➢ Classification jobs with only two class
Classification labels.
➢ Binary classification problems often
require two classes, one representing
the normal state and the other
4 Types of representing the aberrant state.
Classification Example:
Tasks in Machine ▪ Prediction of conversion (buy or not).
Learning ▪ Churn forecast (churn or not).
▪ Detection of spam email (spam or
not).
Support
Logistic
Vector
Regression
Machines
Well-known
Binary
Classification
Simple Decision
Algorithms
Bayes Trees
2. Multi-Class ➢ does not have the idea of normal and
abnormal outcomes, in contrast to
Classification binary classification. Instead, instances
are grouped into one of several well-
known classes.
4 Types of
Classification Example:
Tasks in Machine ✓ Categorization of faces.
Learning ✓ Classifying plant species.
✓ Character recognition using optical.
2. Multi-Class
Classification ➢ a model might predict that a shot
belongs to one of thousands or tens of
thousands of faces.
Facial Recognition
System
2. Multi-Class ➢ Each word in the sequence of words to
Classification be predicted requires a multi-class
classification, where the vocabulary
size determines the number of
possible classes that may be
predicted and may range from tens of
Text Translation thousands to hundreds of thousands
Models of words.
Progressive Choice
Boosting trees
Well-known Simple
Algorithms for Bayes
Multi-class
Classification Nearest K Rough
Neighbors Forest
One-vs-One
2. Multi-Class
For each pair of classes, fit a single
Classification binary classification model.
Example:
Multi-class consider a multi-class classification
problems can be problem with three classes: ‘red,’
solved using ‘blue,’ and ‘green
algorithms created ✓ Red vs Blue
for binary ✓ Red vs Green
✓ Green vs Blue
classification.
One-vs-Rest
Multi-Class
Fit a single binary classification
Classification model for each class versus all other
classes.
Multi-class Example:
problems can be consider a multi-class classification
solved using problem with three classes: ‘red,’
algorithms created ‘blue,’ and ‘green
for binary ✓ Red vs [Blue, Green]
✓ Blue vs [Red, Green]
classification. ✓ Green vs [Red, Blue]
3. Multi-Label ➢ Multi-label classification problems are
those that feature two or more class
Classification labels and allow for the prediction of
one or more class labels for each
example.
4 Types of ➢ This greatly contrasts with multi-class
Classification classification and binary classification,
Tasks in Machine which anticipate a single class label for
Learning each occurrence.
➢ are frequently modeled using a model
that forecasts many outcomes
3. Multi-Label ➢ involves the assignment of multiple
labels to each data instance, as
Classification opposed to the single-label
assignment in traditional classification.
➢ It allows us to handle complex
4 Types of problems where instances may belong
Classification to multiple categories simultaneously.
Tasks in Machine Example:
Learning a single document can belong to multiple
topics such as sports, politics, and
entertainment.
Multi-label
Gradient
Boosting
Multi-label
Multi-label Random
versions of the Forests
algorithms
Multi-label
Decision
Trees
1. Text Example
Classification classifying news articles
into categories such as
documents or
sports, politics, and
textual data need to entertainment or tagging
be assigned multiple social media posts with
labels relevant topics like
simultaneously. #technology, #travel, or
#food.
2. Image Tagging Example
in an image-sharing
Given an image, platform, images can be
multiple labels are automatically tagged with
assigned to describe labels like #beach,
its content or #sunset, or #family based
features. on the objects or scenes
present in the image.
3. Genomics and 4. Recommender
Bioinformatics Systems
It is used for predicting to recommend multiple
the functions and items or products to
characteristics of users based on their
biological sequences, preferences or past
such as DNA, RNA, and interactions.
proteins.
5. Social Media
Analysis
It can be used to Multi-label classification
categorize social media also aids in identifying
posts or tweets based on and classifying user
topics, sentiments, or profiles based on
intentions. interests, hobbies, or
demographics.
6. Document Tagging Example
and Organization
in a digital library,
➢ to automatically tag or
research papers can be
categorize documents
labeled with relevant
based on their content.
topics like
➢ This enables efficient
#machinelearning,
organization and
#datamining, or
retrieval of documents.
#artificialintelligence.
7. Health Informatics
➢ It can be used to classify ➢ This aids in early
medical records or patient detection, treatment
data into multiple disease planning, and patient
categories or predict the management.
presence of multiple medical
conditions simultaneously.
4. Imbalanced ➢ The term "imbalanced classification"
describes classification jobs where the
Classification distribution of examples within each
class is not equal.
➢ A majority of the training dataset's
4 Types of instances belong to the normal class,
Classification while a minority belong to the
Tasks in Machine abnormal class, making imbalanced
Learning classification tasks binary
classification tasks in general.
Clinical
diagnostic
procedures
Detection
Examples of of outliers
Imbalanced
Classification
Fraud
investigation
➢
Logistic ➢
Regression
➢
➢
➢
Naive Bayes
➢
K-Nearest
➢
Neighbors
➢
Decision
➢
Tree
✓ Triple
✓ Camera
✓
✓
✓ AMOLED Not buy
Fast
Charging Not buy
5000mAh Not buy
<=
15,000 Not buy
Buy Not buy
➢
Random
➢
Forest
✓
➢
➢
Support
Vector
Machine
Boundary Y
lines
Y=1 5
X=1 4
3
2
1
0 X
1 2 3 4 5 6
[Link]