Professional Documents
Culture Documents
Introduction to
Machine Learning
Dr. Muhammad Amjad Iqbal
Associate Professor
University of Central Punjab, Lahore.
Amjad.iqbal@ucp.edu.pk
https://sites.google.com/a/ucp.edu.pk/iml/
Slides of Prof. Dr. Andrew Ng, Stanford
Assessment
Scale: Bad, Average, Good, Very Good
• How good are you in programming
– think of “Data structures” course?
• How good are you in Mathematics?
– think of “Discrete Structures” course?
• How good are you in Probability and Statistics?
Course Logistics
• Two lectures per week
1
10/23/2023
Course Objectives
• To introduce the basic concepts of Machine
Learning.
• To make students understand the use of machine
learning approaches to solve some laboratory
problems initially and real world problems later on.
• To equip students with structures and strategies for
complex problem solving
2
10/23/2023
Reference Books
• No single textbook
Reference Books
• Stuart Russell and Peter Norvig. Artificial
Intelligence A Modern Approach – 3rd edition
Motivation
• Machine Learning is one of the most exiting
area
• Its everywhere
SPAM
9
3
10/23/2023
www.imdb.com
www.amazon.com
Machine Learning
• Grew out of work in AI
• Aim: building intelligent machines
• What we knew already: Program a machine to find the
shortest path from A to B (for example)
• Did not know much: How to write AI programs that can
do more interesting things like web search, photo
tagging or email anti-spam, driverless car, etc.
• Realization: Machine learns to do it by itself
• Machine learning was developed as a new capability
for computers
• Today it touches many segments of industry and
science
12
4
10/23/2023
• Computational biology
– Biologists collecting lots of data about gene
sequences, DNA sequences, etc.
– ML algorithms are giving us a much better
understanding of the human genome
• Engineering
15
5
10/23/2023
ML application areas:
• Applications we can’t program by hand.
– Autonomous helicopter, Google driverless car
• Learns to do it by itself
– Handwriting recognition
• Postal Mail: A learning algorithm that has learned how to
read postal code in your handwriting (US mail)
– Most of Natural Language Processing (NLP)
and Computer Vision today
• Applied Machine learning
16
ML application areas:
• Self-customizing programs
– Amazon, IMDB, Youtube recommendations
• Understanding human learning (brain, cognition)
– Learning algorithms are being used today to
understand human learning and to
understand the brain.
17
18
6
10/23/2023
19
Topics
Machine learning algorithms: Background Topics:
- Supervised learning - Linear Algebra
- Unsupervised learning - Probability
- Reinforcement learning
- Bayesian Networks
- Hidden Markov Models
7
10/23/2023
Supervised Learning
• Probably the most common type of machine
learning problem
• Let us introduce it with an example
22
100
0
0 500 1000 1500 2000 2500
750
Size in feet2
24
8
10/23/2023
Features
- Tumor Thickness
- Uniformity of Cell Size
- Uniformity of Cell Shape
…
26
In supervised learning:
• In every example in our data set, we are told
what is the "correct answer”.
• Data is labeled with answers
27
9
10/23/2023
28
10
10/23/2023
Unsupervised Learning
• Data without “right answers”
• Data doesn't have any labels
31
Supervised Learning
x2
x1
32
Unsupervised Learning
x2
A clustering algorithm
x1
33
11
10/23/2023
34
35
Genes
Individuals
DNA microarray data to understand genomics
Colors show the degree to which different individuals do or do not have a
specific gene.
36
[Source: Daphne Koller]
12
10/23/2023
Genes
Individuals
37
[Source: Daphne Koller]
38
Market segmentation
13
10/23/2023
Unsupervised Learning
• K-means Clustering
• A-priori Algorithm
• Self-organizing Maps
Reinforcement learning
• Refers to problems where we don't do one-shot
decision-making
• E.g., in the supervised learning cancer prediction
problem, we have a patient. We predict if tumor
is malignant or benign. Later we’ll know either we
got it right or wrong.
• In reinforcement learning problems, we usually
have to make a sequence of decisions over time.
42
14
10/23/2023
Reinforcement learning
• Examples: autonomous helicopter, driverless car
• Cannot program by hand
• Stochastic environment: too many possibilities
• Q Learning
43
Probabilistic reasoning
• Turing award (Nobel prize in Computer Science)
for Bayesian networks
44
END
45
15