• 沒有找到結果。

learning possible with infinite lines :-)

Training versus Testing Effective Number of Lines

Effective Number of Lines

maximum kinds of lines with respect to N inputs

x 1

, x

2

,· · · , x

N

⇐⇒

effective number of lines

must be≤ 2

N

(why?)

finite ‘grouping’ of infinitely-many lines∈ H

wish:

P

E

in

(g)− E

out

(g) > 

≤ 2 ·

effective(N)

· exp

−2

2

N

lines in 2D

N effective(N)

1 2

2 4

3 8

4 14

< 2 N

if 1 effective(N) can replace M and

if

2 effective(N) 2

N

Training versus Testing Effective Number of Lines

Effective Number of Lines

maximum kinds of lines with respect to N inputs

x 1

, x

2

,· · · , x

N

⇐⇒

effective number of lines

must be≤ 2

N

(why?)

finite ‘grouping’ of infinitely-many lines∈ H

wish:

P

E

in

(g)− E

out

(g) > 

≤ 2 ·

effective(N)

· exp

−2

2

N

lines in 2D

N effective(N)

1 2

2 4

3 8

4 14

< 2 N

if 1 effective(N) can replace M and

if

2 effective(N) 2

N

learning possible with infinite lines :-)

Training versus Testing Effective Number of Lines

Effective Number of Lines

maximum kinds of lines with respect to N inputs

x 1

, x

2

,· · · , x

N

⇐⇒

effective number of lines

must be≤ 2

N

(why?)

finite ‘grouping’ of infinitely-many lines∈ H

wish:

P

E

in

(g)− E

out

(g) > 

≤ 2 ·

effective(N)

· exp

−2

2

N

lines in 2D

N effective(N)

1 2

2 4

3 8

4 14

< 2 N

if 1 effective(N) can replace M and

if

2 effective(N) 2

N

learning possible with infinite lines :-)

Training versus Testing Effective Number of Lines

Effective Number of Lines

maximum kinds of lines with respect to N inputs

x 1

, x

2

,· · · , x

N

⇐⇒

effective number of lines

must be≤ 2

N

(why?)

finite ‘grouping’ of infinitely-many lines∈ H

wish:

P

E

in

(g)− E

out

(g) > 

≤ 2 ·

effective(N)

· exp

−2

2

N

lines in 2D

N effective(N)

1 2

2 4

3 8

4 14

< 2 N

if 1 effective(N) can replace M and

if

2 effective(N) 2

N

learning possible with infinite lines :-)

Training versus Testing Effective Number of Lines

Effective Number of Lines

maximum kinds of lines with respect to N inputs

x 1

, x

2

,· · · , x

N

⇐⇒

effective number of lines

must be≤ 2

N

(why?)

finite ‘grouping’ of infinitely-many lines∈ H

wish:

P

E

in

(g)− E

out

(g) > 

≤ 2 ·

effective(N)

· exp

−2

2

N

lines in 2D

N effective(N)

1 2

2 4

3 8

4 14

< 2 N

if 1 effective(N) can replace M and

if

2 effective(N) 2

N

learning possible with infinite lines :-)

Training versus Testing Effective Number of Lines

Effective Number of Lines

maximum kinds of lines with respect to N inputs

x 1

, x

2

,· · · , x

N

⇐⇒

effective number of lines

must be≤ 2

N

(why?)

finite ‘grouping’ of infinitely-many lines∈ H

wish:

P

E

in

(g)− E

out

(g) > 

≤ 2 ·

effective(N)

· exp

−2

2

N

lines in 2D

N effective(N)

1 2

2 4

3 8

4 14

< 2 N

if 1 effective(N) can replace M and

if

2 effective(N) 2

N

learning possible with infinite lines :-)

Training versus Testing Effective Number of Lines

Fun Time

What is the effective number of lines for five inputs ∈ R 2 ?

1

14

2

16

3

22

4

32

Reference Answer: 3

If you put the inputs roughly around a circle, you can then pick any consecutive inputs to be on one side of the line, and the other inputs to be on the other side. The procedure leads to effectively 22 kinds of lines, which is

much smaller than 2 5 = 32. You shall find it difficult

to generate more kinds by varying the inputs, and we will give a formal proof in future lectures.

•x

1

•x

2

•x

3

•x

4

•x

5

Training versus Testing Effective Number of Lines

Fun Time

What is the effective number of lines for five inputs ∈ R 2 ?

1

14

2

16

3

22

4

32

Reference Answer: 3

If you put the inputs roughly around a circle, you can then pick any consecutive inputs to be on one side of the line, and the other inputs to be on the other side. The procedure leads to effectively 22 kinds of lines, which is

much smaller than 2 5 = 32. You shall find it difficult

to generate more kinds by varying the inputs, and we will give a formal proof in future lectures.

•x

1

•x

2

•x

3

•x

4

•x

5

Training versus Testing Effective Number of Hypotheses

Dichotomies: Mini-hypotheses

H = {hypothesis h : X → {×,

◦}}

call

h(x

1

, x

2

, . . . , x

N

) = (h(x

1

), h(x

2

), . . . , h(x

N

))∈ {×,

◦} N

a

dichotomy: hypothesis ‘limited’ to the eyes of x 1

, x

2

, . . . , x

N

H(x

1

, x

2

, . . . , x

N

):

all dichotomies ‘implemented’ by H on x 1 , x 2 , . . . , x N

hypothesesH dichotomiesH(x

1

, x

2

, . . . , x

N

) e.g. all lines in R

2

{◦◦◦◦,

◦◦◦×

,

◦◦××

, . . .} size possibly infinite upper bounded by 2

N

|H(x

1

, x

2

, . . . , x

N

)|: candidate for

replacing M

Training versus Testing Effective Number of Hypotheses

Dichotomies: Mini-hypotheses

H = {hypothesis h : X → {×,

◦}}

call

h(x

1

, x

2

, . . . , x

N

) = (h(x

1

), h(x

2

), . . . , h(x

N

))∈ {×,

◦} N

a

dichotomy: hypothesis ‘limited’ to the eyes of x 1

, x

2

, . . . , x

N

H(x

1

, x

2

, . . . , x

N

):

all dichotomies ‘implemented’ by H on x 1 , x 2 , . . . , x N

hypothesesH dichotomiesH(x

1

, x

2

, . . . , x

N

) e.g. all lines in R

2

{◦◦◦◦,

◦◦◦×

,

◦◦××

, . . .} size possibly infinite upper bounded by 2

N

|H(x

1

, x

2

, . . . , x

N

)|: candidate for

replacing M

Training versus Testing Effective Number of Hypotheses

Dichotomies: Mini-hypotheses

H = {hypothesis h : X → {×,

◦}}

call

h(x

1

, x

2

, . . . , x

N

) = (h(x

1

), h(x

2

), . . . , h(x

N

))∈ {×,

◦} N

a

dichotomy: hypothesis ‘limited’ to the eyes of x 1

, x

2

, . . . , x

N

H(x

1

, x

2

, . . . , x

N

):

all dichotomies ‘implemented’ by H on x 1 , x 2 , . . . , x N

hypothesesH dichotomiesH(x

1

, x

2

, . . . , x

N

) e.g. all lines in R

2

{◦◦◦◦,

◦◦◦×

,

◦◦××

, . . .} size possibly infinite upper bounded by 2

N

|H(x

1

, x

2

, . . . , x

N

)|: candidate for

replacing M

Training versus Testing Effective Number of Hypotheses

Dichotomies: Mini-hypotheses

H = {hypothesis h : X → {×,

◦}}

call

h(x

1

, x

2

, . . . , x

N

) = (h(x

1

), h(x

2

), . . . , h(x

N

))∈ {×,

◦} N

a

dichotomy: hypothesis ‘limited’ to the eyes of x 1

, x

2

, . . . , x

N

H(x

1

, x

2

, . . . , x

N

):

all dichotomies ‘implemented’ by H on x 1 , x 2 , . . . , x N

hypothesesH dichotomiesH(x

1

, x

2

, . . . , x

N

) e.g. all lines in R

2

{◦◦◦◦,

◦◦◦×

,

◦◦××

, . . .} size possibly infinite upper bounded by 2

N

|H(x

1

, x

2

, . . . , x

N

)|: candidate for

replacing M

Training versus Testing Effective Number of Hypotheses

Dichotomies: Mini-hypotheses

H = {hypothesis h : X → {×,

◦}}

call

h(x

1

, x

2

, . . . , x

N

) = (h(x

1

), h(x

2

), . . . , h(x

N

))∈ {×,

◦} N

a

dichotomy: hypothesis ‘limited’ to the eyes of x 1

, x

2

, . . . , x

N

H(x

1

, x

2

, . . . , x

N

):

all dichotomies ‘implemented’ by H on x 1 , x 2 , . . . , x N

hypothesesH dichotomiesH(x

1

, x

2

, . . . , x

N

) e.g. all lines in R

2

{◦◦◦◦,

◦◦◦×

,

◦◦××

, . . .} size possibly infinite upper bounded by 2

N

Training versus Testing Effective Number of Hypotheses

Growth Function

|H(x

1

, x

2

, . . . , x

N

)|: depend on inputs (x

1

, x

2

, . . . , x

N

)

growth function:

remove dependence by

taking max of all possible (x 1 , x 2 , . . . , x N )

m

H

(N) = max

x

1

,x

2

,...,x

N

∈X

|H(x

1

, x

2

, . . . , x

N

)|

finite, upper-bounded by 2

N

lines in 2D

N m

H

(N)

1 2

2 4

3 max(. . . , 6, 8)

=8 4 14

< 2 N

how to ‘calculate’ the growth function?

Training versus Testing Effective Number of Hypotheses

Growth Function

|H(x

1

, x

2

, . . . , x

N

)|: depend on inputs (x

1

, x

2

, . . . , x

N

)

growth function:

remove dependence by

taking max of all possible (x 1 , x 2 , . . . , x N )

m

H

(N) = max

x

1

,x

2

,...,x

N

∈X

|H(x

1

, x

2

, . . . , x

N

)|

finite, upper-bounded by 2

N

lines in 2D

N m

H

(N)

1 2

2 4

3 max(. . . , 6, 8)

=8 4 14

< 2 N

how to ‘calculate’ the growth function?

Training versus Testing Effective Number of Hypotheses

Growth Function

|H(x

1

, x

2

, . . . , x

N

)|: depend on inputs (x

1

, x

2

, . . . , x

N

)

growth function:

remove dependence by

taking max of all possible (x 1 , x 2 , . . . , x N )

m

H

(N) = max

x

1

,x

2

,...,x

N

∈X

|H(x

1

, x

2

, . . . , x

N

)|

finite, upper-bounded by 2

N

lines in 2D

N m

H

(N)

1 2

2 4

3 max(. . . , 6, 8)

=8 4 14

< 2 N

how to ‘calculate’ the growth function?

Training versus Testing Effective Number of Hypotheses

Growth Function

|H(x

1

, x

2

, . . . , x

N

)|: depend on inputs (x

1

, x

2

, . . . , x

N

)

growth function:

remove dependence by

taking max of all possible (x 1 , x 2 , . . . , x N )

m

H

(N) = max

x

1

,x

2

,...,x

N

∈X

|H(x

1

, x

2

, . . . , x

N

)|

finite, upper-bounded by 2

N

lines in 2D

N m

H

(N)

1 2

2 4

3 max(. . . , 6, 8)

=8 4 14

< 2 N

how to ‘calculate’ the growth function?

Training versus Testing Effective Number of Hypotheses

Growth Function

|H(x

1

, x

2

, . . . , x

N

)|: depend on inputs (x

1

, x

2

, . . . , x

N

)

growth function:

remove dependence by

taking max of all possible (x 1 , x 2 , . . . , x N )

m

H

(N) = max

x

1

,x

2

,...,x

N

∈X

|H(x

1

, x

2

, . . . , x

N

)|

finite, upper-bounded by 2

N

lines in 2D

N m

H

(N)

1 2

2 4

3 max(. . . , 6, 8)

=8 4 14

< 2 N

how to ‘calculate’ the growth function?

Training versus Testing Effective Number of Hypotheses

Growth Function for Positive Rays

x

1

x

2

x

3

. . . x

N

h(x) = −1 h(x) = +1

a

X = R (one dimensional)

H contains h, where

each h(x ) = sign(x − a) for threshold a

‘positive half’ of 1D perceptrons

one dichotomy for a∈ each spot (x

n

, x

n+1

):

m H (N) = N + 1

(N + 1)

 2 N

when N large!

x

1

x

2

x

3

x

4

◦ ◦ ◦ ◦

× ◦ ◦ ◦

× × ◦ ◦

× × × ◦

× × × ×

Training versus Testing Effective Number of Hypotheses

Growth Function for Positive Rays

x

1

x

2

x

3

. . . x

N

h(x) = −1 h(x) = +1

a

X = R (one dimensional)

H contains h, where

each h(x ) = sign(x − a) for threshold a

‘positive half’ of 1D perceptrons

one dichotomy for a∈ each spot (x

n

, x

n+1

):

m H (N) = N + 1

(N + 1)

 2 N

when N large!

x

1

x

2

x

3

x

4

◦ ◦ ◦ ◦

× ◦ ◦ ◦

× × ◦ ◦

× × × ◦

× × × ×

Training versus Testing Effective Number of Hypotheses

Growth Function for Positive Rays

x

1

x

2

x

3

. . . x

N

h(x) = −1 h(x) = +1

a

X = R (one dimensional)

H contains h, where

each h(x ) = sign(x − a) for threshold a

‘positive half’ of 1D perceptrons

one dichotomy for a∈ each spot (x

n

, x

n+1

):

m H (N) = N + 1

(N + 1)

 2 N

when N large!

x

1

x

2

x

3

x

4

◦ ◦ ◦ ◦

× ◦ ◦ ◦

× × ◦ ◦

× × × ◦

× × × ×

Training versus Testing Effective Number of Hypotheses

Growth Function for Positive Rays

x

1

x

2

x

3

. . . x

N

h(x) = −1 h(x) = +1

a

X = R (one dimensional)

H contains h, where

each h(x ) = sign(x − a) for threshold a

‘positive half’ of 1D perceptrons

one dichotomy for a∈ each spot (x

n

, x

n+1

):

m H (N) = N + 1

(N + 1)

 2 N

when N large!

x

1

x

2

x

3

x

4

◦ ◦ ◦ ◦

× ◦ ◦ ◦

× × ◦ ◦

× × × ◦

× × × ×

Training versus Testing Effective Number of Hypotheses

Growth Function for Positive Rays

x

1

x

2

x

3

. . . x

N

h(x) = −1 h(x) = +1

a

X = R (one dimensional)

H contains h, where

each h(x ) = sign(x − a) for threshold a

‘positive half’ of 1D perceptrons

one dichotomy for a∈ each spot (x

n

, x

n+1

):

m H (N) = N + 1

x

1

x

2

x

3

x

4

◦ ◦ ◦ ◦

× ◦ ◦ ◦

Training versus Testing Effective Number of Hypotheses

Growth Function for Positive Intervals

x

1

x

2

x

3

. . . x

N

h(x) = −1 h(x) = +1 h(x) = −1

X = R (one dimensional)

H contains h, where

each h(x ) = +1 iff x ∈ [`, r), −1 otherwise

one dichotomy for each ‘interval kind’

m H (N)

=

N + 1

2



| {z }

interval ends in N + 1 spots

+

1

|{z}

all ×

= 1

2 N 2 + 1 2 N + 1

1

2

N

2

+

1 2

N + 1

 2 N

when N large!

x

1

x

2

x

3

x

4

◦ × × ×

◦ ◦ × ×

◦ ◦ ◦ ×

◦ ◦ ◦ ◦

× ◦ × ×

× ◦ ◦ ×

× ◦ ◦ ◦

× × ◦ ×

× × ◦ ◦

× × × ◦

× × × ×

Training versus Testing Effective Number of Hypotheses

Growth Function for Positive Intervals

x

1

x

2

x

3

. . . x

N

h(x) = −1 h(x) = +1 h(x) = −1

X = R (one dimensional)

H contains h, where

each h(x ) = +1 iff x ∈ [`, r), −1 otherwise

one dichotomy for each ‘interval kind’

m H (N)

=

N + 1 2



| {z }

interval ends in N + 1 spots

+

1

|{z}

all ×

1

2

N

2

+

1 2

N + 1

 2 N

when N large!

x

1

x

2

x

3

x

4

◦ × × ×

◦ ◦ × ×

◦ ◦ ◦ ×

◦ ◦ ◦ ◦

× ◦ × ×

× ◦ ◦ ×

× ◦ ◦ ◦

× × ◦ ×

× × ◦ ◦

× × × ◦

× × × ×

Training versus Testing Effective Number of Hypotheses

Growth Function for Positive Intervals

x

1

x

2

x

3

. . . x

N

h(x) = −1 h(x) = +1 h(x) = −1

X = R (one dimensional)

H contains h, where

each h(x ) = +1 iff x ∈ [`, r), −1 otherwise

one dichotomy for each ‘interval kind’

m H (N)

=

N + 1 2



| {z }

interval ends in N + 1 spots

+

1

|{z}

all ×

= 1

2 N 2 + 1 2 N + 1

1

2

N

2

+

1 2

N + 1

 2 N

when N large!

x

1

x

2

x

3

x

4

◦ × × ×

◦ ◦ × ×

◦ ◦ ◦ ×

◦ ◦ ◦ ◦

× ◦ × ×

× ◦ ◦ ×

× ◦ ◦ ◦

× × ◦ ×

× × ◦ ◦

× × × ◦

× × × ×

Training versus Testing Effective Number of Hypotheses

Growth Function for Positive Intervals

x

1

x

2

x

3

. . . x

N

h(x) = −1 h(x) = +1 h(x) = −1

X = R (one dimensional)

H contains h, where

each h(x ) = +1 iff x ∈ [`, r), −1 otherwise

one dichotomy for each ‘interval kind’

m H (N)

=

N + 1 2



| {z }

interval ends in N + 1 spots

+

1

|{z}

all ×

x

1

x

2

x

3

x

4

◦ × × ×

◦ ◦ × ×

◦ ◦ ◦ ×

◦ ◦ ◦ ◦

× ◦ × ×

× ◦ ◦ ×

× ◦ ◦ ◦

Training versus Testing Effective Number of Hypotheses

Growth Function for Convex Sets (1/2)

up

bottom

相關文件