Theorem 29.3(3), upper bound: every ERM learns in the realizable case with examples
ProvedUnderstandingML.multiclass_realizable_upper_boundThis is the upper half of item 3 of the Multiclass Fundamental Theorem.
Let be a domain with a -algebra containing all singletons, let be a finite label set with (also with measurable singletons), and let be a class of measurable hypotheses with Natarajan dimension (Definition 29.2). The loss is the multiclass – loss . Assume moreover that is nonempty and has the countable-approximation property (Remark 3.1).
There is an absolute constant (independent of , , and ) such that every ERM learner for PAC learns under the realizability assumption with sample complexity
That is, for all , every probability distribution over , every measurable labeling function for which some satisfies , and every at least this number, the ERM output on satisfies with probability at least .
Formalization Note The realizable multiclass PAC property is the mission's IsMulticlassPACWith, in the shape of Definition 3.1 with error . For the term is .
import Definitions.Def_UnderstandingML_MulticlassLearnability open MeasureTheory open scoped InnerProductSpace
universe u v
namespace UnderstandingML
/-- **Theorem 29.3, part 3 (upper bound)** (p. 403). There is an absolute constant `C₂ > 0` such
that for every nonempty measurable class `H` of functions from `X` to a finite label set `Y` with
the countable-approximation property and Natarajan dimension `d`, every ERM learner PAC learns
`H` in the realizable case with sample complexity
`m_H(ε, δ) ≤ ⌈C₂ (d log(|Y| d/ε) + log(1/δ))/ε⌉`. -/
theorem multiclass_realizable_upper_bound :
∃ C₂ : ℝ, 0 < C₂ ∧
∀ {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSingletonClass X]
[MeasurableSpace Y] [MeasurableSingletonClass Y] [Fintype Y]
(H : Set (X → Y)) (d : ℕ), H.Nonempty → (∀ h ∈ H, Measurable h) →
NPointwiseSeparable H → ndim H = d →
∀ A : Learner (X × Y) (X → Y), IsERMLearner lossMulti H A →
IsMulticlassPACWith H A (fun ε δ ↦
⌈C₂ * (d * Real.log (Fintype.card Y * d / ε) + Real.log (1 / δ)) / ε⌉₊) := by sorry
end UnderstandingML