Professional Documents
Culture Documents
CS 3244
Machine Learning
Background Photo credits: Rafiq Mirza, Luan Ahn, Rosmarie Voegtli @ Flickr
Recap
Learning is used when
1.
2.
3.
A pattern exists
We cannot pin it down
mathematically
We have data on it
Example: PLA
Credit
Analysis
Approve or
Deny?
CLASSIFICATION
= 1
Amount of
Credit
REGRESSION
Next week
Probability
of Default
LOGISTIC REGRESSION
[0, 1]
= 9
sign (9 )
= 1
(9 )
[0, 1]
Outline
Error Measures
Noisy Targets
A real dataset
Input representation
Raw input = (@ , ' , A , B , C , , ADE)
Linear model: (@ , ' , A , , ADE)
Too many (257) parameters!
(@ , ' , A )
Illustration of features
= (@ , ' , A )
' = intensity
A = symmetry
Iterations of PLA
One iteration of PLA:
+
+1
Error
Symmetry
Iterations
Average intensity
10
Symmetry
Run PLA
- At each step keep the best Ein
(and ) so far
(its not rocket science, but it works!)
Iterations
Symmetry
Average intensity
Iterations
NUS CS3244: Machine Learning
Average intensity
11
Nonlinear transformation
Outline
Error Measures
Noisy Targets
12
Credit Approval
How much credit
do we extend this
person?
Classification: Approve/Deny
Regression: Credit Line (dollar amount)
Input: <table on the left>
Criterion
Value
Age
32 years
Gender
Male
Salary
40 K
Debt
26 K
Years in Job
1 year
Years at
Current
Residence
3 years
13
1
A
in = V( R R )
RP'
Average
NUS CS3244: Machine Learning
How bad
is bad?
14
15
NR
1
= V(9 R R )A
RP'
1
=
A
' 9
A 9
where = B 9 , =
Quick Question:
What are the dimensions of X?
* 9
NUS CS3244: Machine Learning
'
A
B
*
16
Minimizing Ein
NR
NR
1
=
A 9
=
*
9 = 9
= Z
where Z = 9
[' 9
17
Z
[' 9
+ 1
18
* 9
input data matrix
'
A
B
target vector
[' 9
One-step learning!
19
20
Whats wrong
with this
picture?
Hint: think
squared error
21
Outline
Error Measures
Noisy Targets
22
Hypothesis:
23
Another example
Credit line is affected by years in current residence,
but not in a linear way
24
V N N
NP@
sign(V N N )
NP@
25
(' , A , , * ) ('A , AA , , *A )
26
27
= ' , A , , O
= (@ , ' , , Of )
' , A , , *
@ , ' , , *
' , A , , *
?
No weights in
' , A , , *
h = (' , A ,, Of )
h 9
= sign
h 9 )
= sign(
NUS CS3244: Machine Learning
28
Outline
>> Error Measures
>> Noisy Targets
29
DATA
R = (R )
TRAINING EXAMPLES
', ' , , (* , * )
(historical records of credit customers)
LEARNING
ALGORITHM
FINAL HYPOTHESIS
(final credit approval function)
HYPOTHESIS SET
30
Error measures
What does mean?
Need an error measure ,
This is almost always a pointwise definition: e( , ())
Examples weve seen:
Squared error
( ())A
Binary error
[[ ]]
Which is for
classification?
31
1
= V ( R , R )
RP'
Why not a
sum instead
of an
average?
Out-of-sample error:
stu = [( , )]
32
DATA
R = (R )
TRAINING EXAMPLES
', ' , , (* , * )
(historical records of credit customers)
() ()
LEARNING
ALGORITHM
FINAL HYPOTHESIS
(final credit approval function)
HYPOTHESIS SET
33
+1 sick
1 well
34
+1 sick
1 well
35
During SARS
Are you sick?
False reject highly costly!
Epidemic ensures!
False accept requires inconvenience
of quarantine.
+1 sick
1 well
00
NUS CS3244: Machine Learning
36
37
DATA
R = (R )
TRAINING EXAMPLES
', ' , , (* , * )
ERROR
MEASURE
()
() ()
LEARNING
ALGORITHM
FINAL HYPOTHESIS
(final credit approval function)
HYPOTHESIS SET
Quick Question:
where does the
error measure go?
38
Noisy targets
The target function isnt always a function :
Criterion
Value
Age
32 years
Gender
Male
Salary
40 K
Debt
26 K
Years in Job
1 year
Years at
Current
Residence
3 years
Is misreporting
salary also a
cause of
noisy targets?
39
Target distribution
Instead of saying the target is a function, think of it as a
distribution: (|)
Our data , is now generated by the joint distribution:
(|)
40
DATA
TRAINING EXAMPLES
', ' , , (* , * )
ERROR
MEASURE
()
LEARNING
ALGORITHM
() ()
FINAL HYPOTHESIS
(final credit approval function)
HYPOTHESIS SET
41
Summary
Linear models use the signal:
= 9
Classification: = sign 9
Regression: = 9
['
Error measures
Application specific, user should
specify
False accepts and rejects may
differ in badness
Noisy targets
= ~(|)
Nonlinear transformation
9 is linear in
b
42