Machine Learning

Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

Machine Learning

DS221 – Spring 2023


Instructor: Abinta Mehmood
Outline

• Introduction to Machine Learning


• AI vs ML vs DL
• Learning in ML
• Applications of ML
• Types of Learning
• Examples
Learning in ML
Example
Traditional Programming
Data
Computer Output
Program

Machine Learning

Data
Computer Program
Output
AI vs ML vs DL
AI vs ML vs DL
• AI is a broader term that describes the capability of the
machine to learn and solve problems just like humans.

• A small algorithmic rule for self-driving car can be:


if distance_from_in_front <100m:
stop();
else:
keep_moving();

• There are two ways of incorporating intelligence in artificial


things i.e., to achieve artificial intelligence. One is through
machine learning and another is through deep learning.
AI vs ML vs DL
• Machine Learning:
“Technique to learn from data through training and then apply
learning to make an informed decision”
• Analyzing and learning from data comes under the training
part of the machine learning model.

• “Difference between the predicted and actual value is computed using loss-
function or objective function. Therefore, defining the objective/loss function
is the gist of ML model.”
• Examples: weather forecasting, Netflix recommendations, stock prediction,
to malware detection.
• For example, in the case of recommending items to a user, the objective is
to minimize the difference between the predicted rating of an item by the
model and the actual rating given by the user.
.
AI vs ML vs DL
Deep Learning – The Future
• It is based on an artificial neural network which is nothing but a mimic of
the working of the human brain.
• Just like the ML model, the DL model requires a large amount of data to
learn and make an informed decision and is therefore also considered a
subset of ML.
• DL models do not require any feature extraction pre-processing step and
are capable of classifying data into different classes and categories
themselves.
• Without DL, Alexa, Siri, Google Voice Assistant, Google Translation, Self-
driving cars are not possible
• Raw Data is given to DL model. Pre-processed data is given to ML model.
• Deep Learning is seen as a rocket whose fuel is data.
Types of Learning

• Supervised (inductive) learning


– Training data includes desired outputs
• Unsupervised learning
– Training data does not include desired outputs
• Semi-supervised learning
– Training data includes a few desired outputs
• Reinforcement learning
– Rewards from sequence of actions
Types of Learning
• Supervised learning
– Regression
– Classification
• Unsupervised learning
– Clustering
– Dimensionality reduction

Data can be numerical and categorial


Numerical: age, id, weight, gpa etc.
Categorial: Gender, Nationality, Cat/Dog etc.
Steps Involved
Training Training
Labels
Training
Images
Image Learned
Training
Features model

Testing

Image Learned
Prediction
Features model
Test Image Slide credit: D. Hoiem and L. Lazebnik
Features

• Raw pixels

• Histograms

• GIST descriptors

Slide credit: L. Lazebnik


Learning Associations

• Basket analysis:
P (Y | X ) probability that somebody who
buys X also buys Y where X and Y are
products/services.

Example: P ( chips | coke ) = 0.7

19
Classification
• Example:
Credit scoring
• Differentiating
between low-
risk and high-
risk customers
from their
income and
savings Discriminant: IF income > θ1 AND savings > θ2
THEN low-risk ELSE high-risk
20
Classification: Applications
• Aka Pattern recognition
• Face recognition: Pose, lighting, occlusion
(glasses, beard), make-up, hair style
• Character recognition: Different handwriting
styles.
• Speech recognition: Temporal dependency.
– Use of a dictionary or the syntax of the language.
– Sensor fusion: Combine multiple modalities; eg,
visual (lip image) and acoustic for speech
• Medical diagnosis: From symptoms to
illnesses 21
Face Recognition

Training examples of a person

Test images

AT&T Laboratories, Cambridge UK


http://www.uk.research.att.com/facedatabase.html
22
Regression

• Example: Price of
a used car
y = wx+w0
• x : car attributes
y : price
y = g (x | θ )
g ( ) model,
θ parameters
23
Unsupervised Learning
• Learning “what normally happens”
• No output
• Clustering: Grouping similar instances
• Example applications
– Customer segmentation
– Image compression: Color quantization
– Bioinformatics

24
Unsupervised Learning

25
Reinforcement Learning

• Learning a policy: A sequence of outputs


• No supervised output but delayed reward
• Game playing
• Robot in a maze
• Multiple agents, partial observability, ...

26

You might also like