Finite concept classes are PAC learnable in the realizable setting #
Let H be a finite concept class and D a probability distribution on α × β realizable by H.
A hypothesis whose true error exceeds ε agrees with m i.i.d. examples with probability at most
(1 - ε) ^ m. A consistent learner outputs a concept of the version space on almost every sample,
so by the union bound its error exceeds ε with probability at most |H| (1 - ε) ^ m. Hence
m ≥ (log |H| + log (1 / δ)) / ε
samples make every consistent learner (in particular every empirical risk minimizer, see
IsERM.isConsistent) an (ε, δ)-PAC learner over all distributions realizable by H
[ShalevShwartzBenDavid2014, Corollary 2.3]. Learners here are semantic maps from samples to
hypotheses; no running-time bound is claimed.
The probability bounds need the misclassification set {p | h p.1 ≠ p.2} of every h ∈ H to be
measurable. This holds when every h ∈ H is measurable and equality on β is measurable, see
measurableSet_misclassified; for instance when β is Bool.
Main results #
measure_pi_forall_apply_eq_eq_pow: a hypothesis survivesmi.i.d. examples with probability(1 - error D h) ^ m;measure_pi_forall_apply_eq_eq_pow_cardindexes the examples by any finite type.measure_pi_exists_consistent_lt_error_le_card_mul_pow: the union bound|H| (1 - ε) ^ mon someh ∈ Hwith error aboveεagreeing with every example, for any distribution.IsConsistent.measure_pi_lt_error_le_card_mul_pow: the union bound|H| (1 - ε) ^ mfor a consistent learner of a finite class.natCast_mul_one_sub_ofReal_pow_le:n (1 - ε) ^ m ≤ δoncelog n + log (1 / δ) ≤ ε m.IsConsistent.measure_pi_lt_error_le_of_log_card_add_log_inv_le: the Occam sample-size form.isPACLearnerFor_realizableDistributions_of_log_card_add_log_inv_le: finite classes are(ε, δ)-PAC learnable frommexamples wheneverlog |H| + log (1 / δ) ≤ ε m.sampleComplexity_realizableDistributions_le_of_finite: the realizable sample complexity of a finite class is at most⌈(log |H| + log (1 / δ)) / ε⌉.
References #
A fixed hypothesis h agrees with i.i.d. examples from D indexed by a finite type ι with
probability (1 - error D h) ^ |ι|.
A fixed hypothesis h agrees with all m i.i.d. examples drawn from D with probability
(1 - error D h) ^ m.
Union bound over a finite class. For any distribution D, the probability over m i.i.d.
examples that some h ∈ H with true error greater than ε agrees with all of them is at most
|H| (1 - ε) ^ m. No learner and no realizability are involved.
Union bound for consistent learners of a finite class. If D is realizable by the finite
class H and A is consistent with H, then the probability over m i.i.d. examples that the
output of A has true error greater than ε is at most |H| (1 - ε) ^ m.
Occam bound for finite classes [ShalevShwartzBenDavid2014, Corollary 2.3]. If D is
realizable by the finite class H, A is consistent with H, and
log |H| + log (1 / δ) ≤ ε m, then the output of A on m i.i.d. examples has true error
greater than ε with probability at most δ.
Finite classes are PAC learnable in the realizable setting
[ShalevShwartzBenDavid2014, Corollary 2.3]: a finite class H is (ε, δ)-PAC learnable
from m examples over the distributions realizable by H whenever
log |H| + log (1 / δ) ≤ ε m. If H is nonempty the learner is any consistent learner, which
exists by exists_isConsistent. If H is empty no distribution is realizable, and the
hypothesis forces m ≥ 1 because log 0 = 0 < log (1 / δ); any learner that returns the label of
its first example works.
The realizable sample complexity of a finite class H is at most
⌈(log |H| + log (1 / δ)) / ε⌉ [ShalevShwartzBenDavid2014, Corollary 2.3].