Sunteți pe pagina 1din 19

Learning From Data

Yaser S. Abu-Mostafa

California Institute of Te hnology

Le ture 1:

The Learning Problem

Sponsored by Calte h's Provost O e, E&AS Division, and IST

Tuesday, April 3, 2012

The learning problem - Outline


Example of ma hine learning
Components of Learning
A simple model
Types of learning
Puzzle

Learning From Data - Le ture 1

2/19

Example: Predi ting how a viewer will rate a movie


10% improvement = 1 million dollar prize
The essen e of ma hine learning:

A pattern exists.
We annot pin it down mathemati ally.
We have data on it.
Learning From Data - Le ture 1

3/19

Movie rating - a solution


?
s
r
ste

?
e
s
i
ru

? n? kbu
y
d
e tio blo
m
o s a rs

s
like like prefe

s
like

C
m
To

viewer

Mat h movie and


viewer fa tors

add
ontributions
from ea h fa tor

predi ted
rating

movie

Tom
ise

Cru
t?

in i

r?
uste t
kb ten
blo on nt
ion nte
a t edy o
om

Learning From Data - Le ture 1

4/19

The learning approa h


top

viewer
movie

LEARNING

rating
bottom

Learning From Data - Le ture 1

5/19

Metaphor: Credit approval


Appli ant information:

Components of learning

age
gender
annual salary
years in residen e
years in job
urrent debt

23 years
male
$30,000
1 year
1 year
$15,000

Approve redit?
Learning From Data - Le ture 1

6/19

Components of learning

Formalization:
Input: x

( ustomer appli ation)

Output: y

(good/bad ustomer? )

Target fun tion: f : X Y

(ideal redit approval formula)

Data: (x1, y1), (x2, y2), , (xN , yN )

Hypothesis: g : X Y
Learning From Data - Le ture 1

(histori al re ords)

(formula to be used )
7/19

UNKNOWN TARGET FUNCTION


f: X Y
(ideal credit approval function)

TRAINING EXAMPLES
( x1 , y1 ), ... , ( xN , yN )
(historical records of credit customers)
LEARNING
ALGORITHM
A

FINAL
HYPOTHESIS
g~
~f

(final credit approval formula)

HYPOTHESIS SET
H
(set of candidate formulas)

Learning From Data - Le ture 1

8/19

Solution omponents
The 2 solution omponents of the learning
problem:

The Hypothesis Set


H = {h}

gH

UNKNOWN TARGET FUNCTION


f: X Y
(ideal credit approval function)

TRAINING EXAMPLES
( x1 , y1 ), ... , ( xN , yN )
(historical records of credit customers)
LEARNING
ALGORITHM
A

The Learning Algorithm

FINAL
HYPOTHESIS
g~
~f

(final credit approval formula)

HYPOTHESIS SET
H

Together, they are referred to as the learning


model .
Learning From Data - Le ture 1

(set of candidate formulas)

9/19

A simple hypothesis set - the `per eptron'


For input x = (x1, , xd)

`attributes of a ustomer'

Approve redit if

d
P

wixi > threshold,

i=1

Deny redit if

d
P

wixi < threshold.

i=1

This linear formula h H an be written as

h(x) = sign

d
X
i=1

Learning From Data - Le ture 1

wixi

threshold

!
10/19

h(x) = sign

d
X

wi xi +

i=1

w0

Introdu e an arti ial oordinate x0 = 1:

h(x) = sign

d
X

wi xi

i=0

In ve tor form, the per eptron implements

!
_

+
_

+
_

+
+

+
+

_
_

_
_

`linearly separable' data

h(x) = sign(wTx)
Learning From Data - Le ture 1

11/19

A simple learning algorithm - PLA


The per eptron implements

h(x) = sign(wTx)

y= +1

w+y x
x

Given the training set:

(x1, y1), (x2, y2), , (xN , yN )


pi k a mis lassied point:
sign(wTxn) 6= yn
and update the weight ve tor:

y= 1
w+y x

w
x

w w + ynxn
Learning From Data - Le ture 1

12/19

Iterations of PLA
One iteration of the PLA:
w w + yx
where (x, y) is a mis lassied training point.

At iteration t = 1, 2, 3, , pi k a mis lassied point from

+
_
_

+
+
+

(x1, y1), (x2, y2), , (xN , yN )


and run a PLA iteration on it.

+
_

That's it!
Learning From Data - Le ture 1

13/19

The learning problem - Outline


Example of ma hine learning
Components of learning
A simple model
Types of learning
Puzzle

Learning From Data - Le ture 1

14/19

Basi premise of learning


using a set of observations to un over an underlying pro ess

broad premise = many variations

Supervised Learning
Unsupervised Learning
Reinfor ement Learning

Learning From Data - Le ture 1

15/19

Supervised learning
Example from vending ma hines  oin re ognition
25

Mass

Mass

25

5
1

10

10

Size

Learning From Data - Le ture 1

Size

16/19

Mass

Instead of

Unsupervised learning
(input, orre t output), we get (input, ? )

Size

Learning From Data - Le ture 1

17/19

Reinfor ement learning


Instead of (input, orre t output),
we get (input,some output,grade for this output)
The world hampion was
a neural network!

Learning From Data - Le ture 1

18/19

A Learning puzzle
f = 1

f = +1

f =?
Learning From Data - Le ture 1

19/19

S-ar putea să vă placă și