














Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!















Sridhar Mahadevan [email protected] University of Massachusetts
©
Sridhar Mahadevan: CMPSCI 689 – p.1/
Computational learning theory PAC Learning Model Sample complexity: finite case Time complexity: finite case VC dimension: infinite hypothesis spaces
©
Sridhar Mahadevan: CMPSCI 689 – p.2/
Example:
Consider an environmental-cleanup robot that needs to inspect trees for
damage from acid rain. We need to train this robot to recognize “trees”. Suppose we train our robot in Amherst. What will its performance in Florida be?Vice-versa, we train our robot in Florida. How will it do in Amherst? Result:
Robot trained in Florida will get confused by “fall colors”. Vice-versa, robot
trained in Amherst will not recognize palm trees. For any given instance space, there is a
non-uniform
likelihood of seeing different
instances. We can represent this situation by imagining that there is a
probability
distribution
on the space of instances.
The learner does not know this distribution ahead of time, but is allowed to assumethat it is
fixed
. Thus, a learner trained on one particular distribution should only be
tested on that distribution.
©
Sridhar Mahadevan: CMPSCI 689 – p.4/
Requiring a learner to learn the
right
concept is too strict (e.g. is there a “right”
concept of
tree
Instead, we relax this requirement and allow a learner to produce a
good
approximation
to the actual concept.
Let
(x
)^ be a fixed probability distribution on the instance space. Let
c^
be the
target concept, and let
h
be the concept produced by the learner.
Let
x|
c(
x)
h
(x
be the set of instances on which the target concept and
the approximation disagree. Let
be an error tolerance parameter where
. Then
h
is a good approximation (to within
) of
c^
if and only if:
S
(x
©
Sridhar Mahadevan: CMPSCI 689 – p.5/
Define the
version space
as the set of all hypothesis
h
consistent with the
target concept. We say a version space is
exhausted
if there is a only a single hypothesis
h
consistent with the target concept. This is often intractable because it requires thelearner to learn the exact concept. Given a hypothesis space
, a target concept
c, a sequence of examples
of
c,
and an error tolerance
, the version space of
(w.r.t.
) is
-exhausted if it does
not contain any hypothesis that has (
true
) error more than
(w.r.t
c).
We will only require that the learner produce an
-exhausted version space.
Question:
How many examples are needed to
-exhaust a version space?
©
Sridhar Mahadevan: CMPSCI 689 – p.7/
Assume training examples are drawn
independently and randomly
from an unknown
but fixed distribution
on the instance space.
We only require that the learner succeed in producing a good approximation to thetarget concept
with high probability
Specifically, given a confidence parameter
δ , we require the learner to be able to
-exhaust a version space with probability at least
δ
So how many examples are needed for the learner to
-exhaust a version space
with probability
δ
©
Sridhar Mahadevan: CMPSCI 689 – p.8/
Corollary:
Given reliability
δ^
and error
, the number of examples needed to
-exhaust a version space consistent with some
c^
in
is
m
(ln
(^1) ( δ
ln
Proof:
We know from the theorem that
δ^
|e −m
Taking natural logarithms on either side, we get
ln
(δ
ln
m
Transforming the above, we get
m
(ln
(^1) ( δ
ln
©
Sridhar Mahadevan: CMPSCI 689 – p.10/
Let the hypothesis space
be all pure conjunctive formulae over
n
boolean
attributes
.n
n. m
ln
(^1) ( δ
ln
n))
m
ln
(^1) ( δ
nln
Number of examples is linear in
n
Consider
n
,^ δ
, then
m
(ln
ln
This is quite good, considering that there are almost
pure conjunctive
concepts on
boolean variables.
©
Sridhar Mahadevan: CMPSCI 689 – p.11/
PAC-Learn-H
(, δ
Call the EXAMPLE routine
m
times, where m
ln
(^1) ( δ
ln
Collect the examples in a set
Output any
g^
consistent with
Note sample complexity theorem guarantees
g output by algorithm will be PAC.
How do we find a consistent hypothesis?
How do we know if
ln
is polynomial in
n
Can we do better than
ln
What if
is infinite?
©
Sridhar Mahadevan: CMPSCI 689 – p.13/
Let
be the set of all pure conjunctive formulae (monomials) over attributes A
. (e.g.n
is
large
is
mammal
has
claws
can
fly
Algorithm Learn
pure
conj
(, δ, n
Let
m
1 (n
(ln
ln
(^1) ( δ
Call EXAMPLE
m
times and collect examples in set
Initialize
h
n^
n
For each positive example
e^
do
if^ ei
remove
fromi
h
else remove
.i
Output
h
NOTE:
Since algorithm
takes only polynomially many examples, and also runs in
polynomial time (in
1
1 , n δ^
is^
polynomial-time PAC learnable
. ©Sridhar Mahadevan: CMPSCI 689 – p.14/
Class
Sample complexity
PAC-time learnable?
Pure conj.
Polynomial
Polynomial
k-CNF
Polynomial
Polynomial
k-term DNF
Polynomial
No, unless NP
Interesting fact: k-term DNF
k-CNF. So, learning a larger set can be easier than learning
a smaller set!
©
Sridhar Mahadevan: CMPSCI 689 – p.16/
Let
be an instance space, and let
be some (possibly infinite) space of
concepts on
. Let
be some set of instances from
dichotomy
of
is a partition of
into two disjoint subsets
p^
and
.n
We say
shatters
if there exists a hypothesis
h
that is consistent with every
possible dichotomy of
Example 1: Let
be the set of real numbers, and
be the set of all possible
intervals
(a, b
)^ on
. Let
be any two real numbers, for example
}. Then,
shatters
Example 2: Let
be defined by the tree-structured attribute
shape
. Let
be
leaves of the
shape
tree. Let
be any two instances, say
triangle, circle
}. Then
is shattered by
©
Sridhar Mahadevan: CMPSCI 689 – p.17/
The
dimension of a concept space
is the size of the largest set of instances
shattered by
. (Note that it can be infinite).
Example 1: the
dimension is =
Example 2: the
dimension is =
Observation:
Let
d
be the
dimension of a space
. Then,
d 2
d^
log
©
Sridhar Mahadevan: CMPSCI 689 – p.19/
How many examples does it take to PAC learn any concept
c^
, with error
and
confidence
δ
Theorem
(Blumer et al.)
m
log
2 ) + 8 δ^
)log
Note that since
log
|), this is a more tight bound. Also, it applies even for
infinite hypothesis spaces (e.g. all rectangles on the plane). Example:
How many examples does it take to PAC learn a rectangle on the x-y plane,
with confidence 90% and accuracy 95%? Solution:
We need
m
examples, where m^
log
4 log
log
log
.^48 ©Sridhar Mahadevan: CMPSCI 689 – p.20/