PAC Examples
Hopefully these examples can clear up some confusions after reading these formal definitions. Pay attention not just to the algorithm itself but more importantly to the proof that states why it is PAC.
Positive Half-lines
The domain , . // C = H why? by the def of this problem hypothesis is the mapping A positive half line is a threshold (a real number) such that all pts to the left are labeled - and all pts to the right are labels +.
Learning Algorithm
Sort the training data in ascending order Find greatest - labeled pt and smallest + labeled pt Set the threshold anywhere in this interval
Prove PAC

The generalization error of h will be the region b/w h and c. Points in this region is labeled differently by the concept and the hypothesis. We need to show the generalization error is low with high probability. Equivalently (for the convenience of computation?), we need to show .
Two cases for : 1. is more than away from (to the right) 2. is more than away from (to the left)
as the interval where is a pt to the right of c such that Pr is . Now we want to find . only occurs when is to the right of . This only happens when all . (i.e. not training data in that interval so the algorithm cannot learn a threshold exists in that interval.)
Since , . Then
are all random and independent.
By symmetry, .
Now we can bound
So we want to set it less than delta, . Take ln on both sides and solve for m, we get . This shows is PAC-learnable (because as m gets larger and are getting smaller).
Review
We want to bound Pr[err_D > epsilon] first.
Identify the error region then union bound
Set the bound less than delta
Solve for m (m should bound epsilon and delta).
Positive Intervals
Again, the domain . The concept class is also the hypothesis space . Each specifies an interval that will be labeled +. All pts outside of the interval will be labeled -.
Learning Algorithm
Pick a consistent .
Prove PAC
Again, we want to prove is PAC-learnable by . In order to bound , we need to break down all cases where .
Let be the left boundary of c and be the right boundary of c. Define: 1. h is more than away from (to the left) 2. h is more than away from (to the right) 3. h is more than away from (to the left) 4. h is more than away from (to the right)
There are 2 x 2 = 4 combinations: , , ,
We want to have this bound, (Union Bound) (again )
We good. Now set it less than and solve for m Take ln then solve we get .
Learning Axis-aligned Rectangles

Learning Algorithm
c is the target concept. The algorithm finds h which is the smallest consistent rectangle.
Prove PAC
Figure out the cases where . Since h is the smallest rectangle, we grow each edge outward by probability mass . Why it has to be inside c? Cause every pt inside h is labeled + and every pt outside h is labeled -. Outside of c is -, not an error. So we have to identify the error region first. In this problem, err = c - h.
Solve for m.
Ending note: The proofs above are all tailored to each problem. There is a more general theorem for proving PAC.
Last updated