• No results found

Computational Learning Theory: The Theory of Generalization

N/A
N/A
Protected

Academic year: 2021

Share "Computational Learning Theory: The Theory of Generalization"

Copied!
33
0
0

Loading.... (view fulltext now)

Full text

(1)

Computational Learning Theory:

The Theory of Generalization

Machine Learning Fall 2017

Supervised Learning: The Setup

Machine Learning

Spring 2018

(2)

Checkpoint: The bigger picture

• Supervised learning: instances, labels, and hypotheses

• Specific learners

Decision trees Perceptron Winnow

• General ML ideas

Features as high dimensional vectors Overfitting

Mistake-bound: One way of asking “Can my problem be learned?”

Learning algorithm Labeled

data

Hypothesis/

Model h

New example h Prediction

(3)

Checkpoint: The bigger picture

• Supervised learning: instances, labels, and hypotheses

• Specific learners

Decision trees Perceptron LMS

• General ML ideas

Features as high dimensional vectors Overfitting

Learning algorithm Labeled

data

Hypothesis/

Model h

New example h Prediction

(4)

Checkpoint: The bigger picture

• Supervised learning: instances, labels, and hypotheses

• Specific learners

Decision trees Perceptron LMS

• General ML ideas

Features as high dimensional vectors Overfitting

Mistake-bound

Learning algorithm Labeled

data

Hypothesis/

Model h

New example h Prediction

(5)

Checkpoint: The bigger picture

• Supervised learning: instances, labels, and hypotheses

• Specific learners

Decision trees Perceptron LMS

• General ML ideas

Features as high dimensional vectors Overfitting

Learning algorithm Labeled

data

Hypothesis/

Model h

New example h Prediction

(6)

Next Topic: Computational Learning Theory

• The Theory of Generalization

• Probably Approximately Correct (PAC) learning

• Positive and negative learnability results

• Agnostic Learning

• Shattering and the VC dimension

(7)

This lecture: Computational Learning Theory

• The Theory of Generalization

When can we trust the learning algorithm?

What functions can be learned?

Batch learning

• Probably Approximately Correct (PAC) learning

• Positive and negative learnability results

• Agnostic Learning

• Shattering and the VC dimension

(8)

Computational Learning Theory

Are there general “laws of nature” related to learnability?

We want theory that can relate

Probability of successful Learning Number of training examples

Complexity of hypothesis space

Accuracy to which target concept is approximated Manner in which training examples are presented

(9)

Learning Conjunctions

• Teacher (Nature) provides the labels (f(x))

– <(1,1,1,1,1,1,…,1,1), 1>

– <(1,1,1,0,0,0,…,0,0), 0>

– <(1,1,1,1,1,0,...0,1,1), 1>

– <(1,0,1,1,1,0,...0,1,1), 0>

– <(1,1,1,1,1,0,...0,0,1), 1>

– <(1,0,1,0,0,0,...0,1,1), 0>

– <(1,1,1,1,1,1,…,0,1), 1>

– <(0,1,0,1,0,0,...0,1,1), 0>

Some random source (nature) provides training examples

f = x2 ∧ x3 ∧ x4 ∧ x5 ∧ x100

How good is our learning algorithm?

(10)

Learning Conjunctions

• Teacher (Nature) provides the labels (f(x))

– <(1,1,1,1,1,1,…,1,1), 1>

– <(1,1,1,0,0,0,…,0,0), 0>

– <(1,1,1,1,1,0,...0,1,1), 1>

– <(1,0,1,1,1,0,...0,1,1), 0>

– <(1,1,1,1,1,0,...0,0,1), 1>

– <(1,0,1,0,0,0,...0,1,1), 0>

– <(1,1,1,1,1,1,…,0,1), 1>

– <(0,1,0,1,0,0,...0,1,1), 0>

Some random source (nature) provides training examples

f = x2 ∧ x3 ∧ x4 ∧ x5 ∧ x100

h = x

1

∧ x

2

∧ x

3

∧ x

4

∧ x

5

∧ x

100

For a reasonable learning algorithm (by elimination), the final hypothesis will be

How good is our learning algorithm?

(11)

Learning Conjunctions

• Teacher (Nature) provides the labels (f(x))

– <(1,1,1,1,1,1,…,1,1), 1>

– <(1,1,1,0,0,0,…,0,0), 0>

– <(1,1,1,1,1,0,...0,1,1), 1>

– <(1,0,1,1,1,0,...0,1,1), 0>

– <(1,1,1,1,1,0,...0,0,1), 1>

– <(1,0,1,0,0,0,...0,1,1), 0>

– <(1,1,1,1,1,1,…,0,1), 1>

– <(0,1,0,1,0,0,...0,1,1), 0>

Some random source (nature) provides training examples

f = x2 ∧ x3 ∧ x4 ∧ x5 ∧ x100

Whenever the output is 1, x1 is present

How good is our learning algorithm?

h = x

1

∧ x

2

∧ x

3

∧ x

4

∧ x

5

∧ x

100

For a reasonable learning algorithm (by elimination), the final hypothesis will be

(12)

Learning Conjunctions

• Teacher (Nature) provides the labels (f(x))

– <(1,1,1,1,1,1,…,1,1), 1>

– <(1,1,1,0,0,0,…,0,0), 0>

– <(1,1,1,1,1,0,...0,1,1), 1>

– <(1,0,1,1,1,0,...0,1,1), 0>

– <(1,1,1,1,1,0,...0,0,1), 1>

– <(1,0,1,0,0,0,...0,1,1), 0>

– <(1,1,1,1,1,1,…,0,1), 1>

– <(0,1,0,1,0,0,...0,1,1), 0>

Some random source (nature) provides training examples

f = x2 ∧ x3 ∧ x4 ∧ x5 ∧ x100

Whenever the output is 1, x1 is present

How good is our learning algorithm?

h = x

1

∧ x

2

∧ x

3

∧ x

4

∧ x

5

∧ x

100

For a reasonable learning algorithm (by elimination), the final hypothesis will be

With the given data, we only learned an

approximation

to the true concept.

Is it good enough?

(13)

Two Frameworks

Mistake Driven Learning algorithms

Update your hypothesis only when you make mistakes

Define good in terms of how many mistakes you make before you stop Online learning

• Analyze the probabilistic intuition

Never saw a feature in positive examples, maybe we’ll never see it

And if we do, it will be with small probability, so the concepts we learn may be pretty good

Pretty good: In terms of performance on future data

PAC framework

for How good is our learning algorithm?

(14)

The mistake-bound approach

• The mistake bound model is a theoretical approach

– We can determine the number of mistakes the learning algorithm can make before converging

But no answer to “How many examples do you need before converging to a good hypothesis?”

• Because the mistake-bound model makes no

assumptions about the order or distribution of training examples

– Both a strength and a weakness of the mistake bound model

(15)

PAC learning

A model for batch learning

– Train on a fixed training set – Then deploy it in the wild

• How well will your learned hypothesis do on future

instances?

(16)

The setup

Instance Space: X, the set of examples

Concept Space: C, the set of possible target functions: f 2 C is the hidden target function

Eg: all n-conjunctions; all n-dimensional linear functions, …

Hypothesis Space: H, the set of possible hypotheses

This is the set that the learning algorithm explores

Training instances: S£ {-1,1}: positive and negative examples of the target concept. (S is a finite subset of X)

What we want: A hypothesis h Î H such that h(x) = f(x)

A hypothesis h Î H such that h(x) = f(x) for all x ÎS ? A hypothesis h Î H such that h(x) = f(x) for all x ÎX ?

>

<

>

<

>

< x1, f (x1) , x2, f (x2) ,... xn, f (xn)

(17)

The setup

Instance Space: X, the set of examples

Concept Space: C, the set of possible target functions: f ∈ C is the hidden target function

Eg: all n-conjunctions; all n-dimensional linear functions, …

Hypothesis Space: H, the set of possible hypotheses

This is the set that the learning algorithm explores

Training instances: S£ {-1,1}: positive and negative examples of the target concept. (S is a finite subset of X)

What we want: A hypothesis h Î H such that h(x) = f(x)

A hypothesis h Î H such that h(x) = f(x) for all x ÎS ? A hypothesis h Î H such that h(x) = f(x) for all x ÎX ?

>

<

>

<

>

< x1, f (x1) , x2, f (x2) ,... xn, f (xn)

(18)

The setup

Instance Space: X, the set of examples

Concept Space: C, the set of possible target functions: f ∈ C is the hidden target function

Eg: all n-conjunctions; all n-dimensional linear functions, …

Hypothesis Space: H, the set of possible hypotheses

This is the set that the learning algorithm explores

Training instances: S£ {-1,1}: positive and negative examples of the target concept. (S is a finite subset of X)

What we want: A hypothesis h Î H such that h(x) = f(x)

A hypothesis h Î H such that h(x) = f(x) for all x ÎS ? A hypothesis h Î H such that h(x) = f(x) for all x ÎX ?

>

<

>

<

>

< x1, f (x1) , x2, f (x2) ,... xn, f (xn)

(19)

The setup

Instance Space: X, the set of examples

Concept Space: C, the set of possible target functions: f ∈ C is the hidden target function

Eg: all n-conjunctions; all n-dimensional linear functions, …

Hypothesis Space: H, the set of possible hypotheses

This is the set that the learning algorithm explores

Training instances: S×{-1,1}: positive and negative examples of the target concept. (S is a finite subset of X)

What we want: A hypothesis h Î H such that h(x) = f(x)

A hypothesis h Î H such that h(x) = f(x) for all x ÎS ? A hypothesis h Î H such that h(x) = f(x) for all x ÎX ?

>

<

>

<

>

< x1, f (x1) , x2, f (x2) ,... xn, f (xn)

(20)

The setup

Instance Space: X, the set of examples

Concept Space: C, the set of possible target functions: f ∈ C is the hidden target function

Eg: all n-conjunctions; all n-dimensional linear functions, …

Hypothesis Space: H, the set of possible hypotheses

This is the set that the learning algorithm explores

Training instances: S×{-1,1}: positive and negative examples of the target concept. (S is a finite subset of X)

What we want: A hypothesis h Î H such that h(x) = f(x)

A hypothesis h Î H such that h(x) = f(x) for all x ÎS ? A hypothesis h Î H such that h(x) = f(x) for all x ÎX ?

>

<

>

<

>

< x1, f (x1) , x2, f (x2) ,... xn, f (xn)

(21)

The setup

Instance Space: X, the set of examples

Concept Space: C, the set of possible target functions: f ∈ C is the hidden target function

Eg: all n-conjunctions; all n-dimensional linear functions, …

Hypothesis Space: H, the set of possible hypotheses

This is the set that the learning algorithm explores

Training instances: S×{-1,1}: positive and negative examples of the target concept. (S is a finite subset of X)

Training instances are generated by a fixed unknown probability distribution D over X

What we want: A hypothesis h Î H such that h(x) = f(x)

Evaluate h on subsequent examples x ∈ X drawn according to D

(22)

PAC Learning – Intuition

• The assumption of fixed distribution is important for two reasons:

1. Gives us hope that what we learn on the training data will be meaningful on future examples

2. Also gives a well-defined notion of the error of a hypothesis according to the target function

• “The future will be like the past”: We have seen many examples (drawn according to the distribution D)

Since in all the positive examples x1 was active, it is very likely that it will be active in future positive examples

If not, in any case, x1 is active only in a small percentage of the examples so our error will be small

(23)

PAC Learning – Intuition

• The assumption of fixed distribution is important for two reasons:

1. Gives us hope that what we learn on the training data will be meaningful on future examples

2. Also gives a well-defined notion of the error of a hypothesis according to the target function

• “The future will be like the past”: We have seen many examples (drawn according to the distribution D)

Since in all the positive examples x1 was active (1), it is very likely that it will be active in future positive examples

If not, in any case, x1 is active only in a small percentage of the

(24)

Generalization Error of a hypothesis

Definition

Given a distribution D over examples, the error of a hypothesis h with respect to a target concept f is

err

D

(h) = Pr

x ~ D

[h(x) ≠ f(x)]

(25)

Generalization Error of a hypothesis

Definition

Given a distribution D over examples, the error of a hypothesis h with respect to a target concept f is

err

D

(h) = Pr

x ~ D

[h(x) ≠ f(x)]

Instance space X

(26)

Generalization Error of a hypothesis

Definition

Given a distribution D over examples, the error of a hypothesis h with respect to a target concept f is

err

D

(h) = Pr

x ~ D

[h(x) ≠ f(x)]

Instance space X

Target concept f labels all

these points as +

(27)

Generalization Error of a hypothesis

Definition

Given a distribution D over examples, the error of a hypothesis h with respect to a target concept f is

err

D

(h) = Pr

x ~ D

[h(x) ≠ f(x)]

Instance space X

Target concept f labels all

these points as +

A hypothesis h labels all these points as +

(28)

Generalization Error of a hypothesis

Definition

Given a distribution D over examples, the error of a hypothesis h with respect to a target concept f is

err

D

(h) = Pr

x ~ D

[h(x) ≠ f(x)]

Instance space X

Target concept f labels all

these points as +

A hypothesis h labels all these points as +

Error: f and h disagree

(29)

Empirical error

Contrast true error against the empirical error

For a target concept f, the empirical error of a hypothesis h is defined for a training set S as the fraction of examples x in S for which the functions f and h disagree. That is, h(x) ≠ f(x)

Denoted by err

S

(h)

Overfitting: When the empirical error on the training set errS

(h)

is substantially lower than err (h)

(30)

Mistake driven learning vs. Batch learning

Mistake driven learning

• No assumptions about the distribution of examples

• Learning is a sequence of trials

Learner sees a single example, makes a prediction

If mistake, update hypothesis

• Goal: To bound the total

number of mistakes over time

Batch learning

• Examples are drawn from a fixed (perhaps unknown)

probability distribution D over the instance space

• Learning uses a training set S, drawn i.i.d from the

distribution D

• Goal: To find a hypothesis that has low chance of making a mistake on a new example from D

(31)

Mistake driven learning vs. Batch learning

Mistake driven learning

• No assumptions about the distribution of examples

• Learning is a sequence of trials

Learner sees a single example, makes a prediction

If mistake, update hypothesis

• Goal: To bound the total

number of mistakes over time

Batch learning

• Examples are drawn from a fixed (probably unknown)

probability distribution D over the instance space

• Learning uses a training set S, drawn i.i.d from the

distribution D

• Goal: To find a hypothesis that has low chance of making a mistake on a new example

(32)

Mistake driven learning vs. Batch learning

Mistake driven learning

• No assumptions about the distribution of examples

• Learning is a sequence of trials

Learner sees a single example, makes a prediction

If mistake, update hypothesis

• Goal: To bound the total

number of mistakes over time

Batch learning

• Examples are drawn from a fixed (probably unknown)

probability distribution D over the instance space

• Learning uses a training set S, drawn i.i.d from the

distribution D

• Goal: To find a hypothesis that has low chance of making a mistake on a new example from D

(33)

Mistake driven learning vs. Batch learning

Mistake driven learning

• No assumptions about the distribution of examples

• Learning is a sequence of trials

Learner sees a single example, makes a prediction

If mistake, update hypothesis

• Goal: To bound the total

number of mistakes over time

Batch learning

• Examples are drawn from a fixed (probably unknown)

probability distribution D over the instance space

• Learning uses a training set S, drawn i.i.d from the

distribution D

• Goal: To find a hypothesis that has low chance of making a mistake on a new example

References

Related documents

In Baker v. 1984) the plaintiff suffered serious post-surgery infections after breast reduction. The ineffectual post-operative treatment required extensive corrective

The key to the successful treatment of OM in the diabetic foot is a combination of antibiotic therapy and surgical procedures.. The latter may include surgical debridement with

The purpose of this research is to know the effect of giving Strychnine bush extract to the dosage to get the dose of songga extract of wood which is effective to give the

(MANAGED BY JADWA INVESTMENT COMPANY) NOTES TO THE FINANCIAL STATEMENTS (Continued). For the year ended 31 December 2015 (Amounts

Recently, improvement in additive manufacturing in terms of material, resolution and printing time have led to ease fabrication process of microfluidic chips and

In relation with the growth of the economy, the Paraguayan insurance market showed a very pos- itive performance, increasing its premium volume by 16.3 percent (14.4 percent

Based on configuration and contingency, manufacturing industry which applying prospector strategy operating in hostile environment, having organic export channel structure and

Declared Value $ 07/15 PHONE #: E-MAIL ADDRESS : CONTACT NAME : COMPANY NAME: FREEMAN exhibit transportation E-mail: [email protected] or.. EVERY OUTBOUND