Lecture 2: Introduction To Machine Learning
Lecture 2: Introduction To Machine Learning
Machine Learning
T: Play checkers
P: % of games won
E: Playing against
self
Question
Suppose your email program watches which email you
do and do not mark as spam and based on that learn
how to better filter spam. What is the task in this setting
Classifying emails as spam or not spam
The number of emails correctly classifying as spam/not spam
Labelling emails as spam/ not spam
Non of above: This is not a machine learning problem
Machine Learning
Algorithms
Supervised Learning Algorithms
Unsupervised Learning Algorithms
Supervised Learning
Supervised Learning
Supervised Learning
Question
Suppose you are running a company and want to
develop a learning algorithm to address each of two
problems:
Problem 1: you have large inventory of identical items.
You want to predict how many of items will sell over
next 3 months.
Problem 2: you would like your program to examine
individual customer accounts and for each account
decide if it has been hacked or not.
Should you treat these as classification or regression
problem ?
Treat
Treat
Treat
Treat
Unsupervised Learning
Unsupervised Learning
Application
Unsupervised Learning
Application
Unsupervised Learning
Application
Fridge, computer and dishwasher
3000
2500
2000
1500
1000
250
200
150
Fridge
100
50
0
Window size = 2
50
100
150
200
250
Windows [#]
300
350
400
450
Unsupervised Learning
Application
Fridge, computer and dishwasher
State
sequence
of fridge
sequence
of diswasher
StateState
sequence
of fridge
and
computer
S
S
S
S2S6 1 S5S7 4 S2S6 3 S5S7
Average
power
Average
power
Average
power [W]
consumption
consumption
[W]
consumption [W]
Average power consumptionn[W]
3000
120
160
3000
State:
S1S2S2
State:
State:
2500
State:
S
State:S
State:
S
140
1002500
3 5 5
State:
S6
State:
S
4
120
State:
S7
80
2000
2000
100
60
1500
80
1500
40
60
1000
40
20
1000
500
20
0
00 0310 10 320 20 330 30 340 40 350 50 360 60 370 70 380 80 390
250 130 140 150 Windows
120
160 170
[#] 180 190 200 210
State: S1
State: S2
State: S3
State: S4
State: S5
State: S6
State: S7
[#]
WindowsWindows
[#]
200
150
Fridge
100
50
0
Window size = 2
50
100
150
200
250
Windows [#]
300
350
400
450
Question
Of following examples, which one you address
using unsupervised learning algorithm?
Given email labelled as spam/not spam, learn a
spam filter
Given a set of news articles on the web, group
them into set of articles about the same story
Given a database of customer data, automatically
discover market segments and group customer
into different market segments
Given a database of patients diagnosed as either
having diabetes or not, learn to classify a new
patients as either having a diabetes or not.
Ungraded Assignment
Install Octave an open source software
or
Practice with:
Elementary operation: add, subtract,
multiplication, power, divide, etc
Conditional operation: equal, not equal,
greater, greater and equal to, etc
Logical operations: AND, OR, XOR, etc
Variable assignment
Vectors and matrices: defining vectors and
matrices, ones, zeros, rand, eye
doc and help comand