Docsity

Evaluating Hypothesis - Lecture Slides | CSI 5325, Exams of Computer Science

Partial preview of the text

Download Evaluating Hypothesis - Lecture Slides | CSI 5325 and more Exams Computer Science in PDF only on Docsity!

Intro. to machine learning (CSI 5325)

Lecture 11: evaluating hypotheses

Greg Hamerly

Spring 2008

Some content from Tom Mitchell.

Outline

1 Comparing hypotheses

2 Paired t tests

3 Comparing learning methods

Comparing hypotheses

Difference between hypotheses

σ ˆ d

error S 1

(h 1 )(1 − error S 1

(h 1 ))

n 1

error S 2

(h 2 )(1 − error S 2

(h 2 ))

n 2

Comes from the facts that:

error S 1

(h 1

) and error S 2

(h 2

) are both (approximately) normally

distributed (if n is large enough)

the difference of two normally distributed random variables is

also normally distributed

Comparing hypotheses

Hypothesis testing

More interesting than knowing the distribution of

d is knowing

whether h 1 is better than h 2.

But for this we can just use the distribution of

d.

Hypothesis test example:

H

0

: h 1

and h 2

are the same (‘null’ hypothesis)

HA: h 1 and h 2 are different (‘alternative’ hypothesis)

Estimator:

d = error S 1

(h 1

) − error S 2

(h 2

Test: P(

d 6 = 0)

which is the probability that the confidence interval on

d does

NOT contain 0.

Paired t tests

Paired t test to compare h

A

,h

B

N% confidence interval estimate for d:

δ ± t N,k− 1

s¯ δ

s¯ δ

k(k − 1)

k ∑

i=

(δ i

δ)

2

Note δ i

approximately Normally distributed

Paired t tests

Paired t test

The t distribution (or ‘Student’s t distribution) applies when

estimating the mean of normally-distributed random variable with

unknown variance.

Since the variance of the underlying distribution is unknown, the

distribution of the mean estimator has a wider variance than a

normal distribution.

As n → ∞, the t distribution is well-approximated by the normal

distribution.

It’s called a paired test because each hypothesis is tested on the

same sets of examples.

Student’s?

Comparing learning methods

Comparing learning algorithms L

A

and L

B

What we’d like to estimate:

ES⊂D[errorD(LA(S)) − errorD(LB (S))]

where L(S) is the hypothesis output by learner L on training set S

i.e., the expected difference in true error between hypotheses

output by learners L A

and L B

, when trained using randomly

selected training sets S drawn according to distribution D.

But, given limited data D 0

, what is a good estimator?

Comparing learning methods

Comparing learning algorithms L

A

and L

B

E

S⊂D

[error D

(L

A

(S)) − error D

(L

B

(S))]

Given limited data D 0

, what is a good estimator?

could partition D 0 into training set S and training set T 0 , and

measure

errorT 0

(LA(S 0 )) − errorT 0

(LB (S 0 ))

even better, repeat this many times and average the results

(next slide)

Comparing learning methods

Comparing learning algorithms L

A

and L

B

Notice we’d like to use the paired t test on

δ to obtain a

confidence interval

... but it’s not really correct, because training sets in this

algorithm aren’t independent (they overlap!)

It’s more correct to view algorithm as producing an estimate of

E

S⊂D 0

[error D

(L

A

(S)) − error D

(L

B

(S))]

instead of

E

S⊂D

[error D

(L

A

(S)) − error D

(L

B

(S))]

but even this approximation is better than no comparison