Documentation

CslibFrontier.MachineLearning.PACLearning.ERM

Empirical risk minimization #

A learner is an empirical risk minimizer (ERM) for a concept class C if, on every labeled sample, it outputs a concept of C with the fewest sample errors among all concepts of C [ShalevShwartzBenDavid2014, Section 2.3]. On a realizable sample some concept of C makes no errors, so an ERM output lies in the version space: in the realizable setting every ERM learner is a consistent learner (IsConsistent). Every nonempty class has both kinds of learner. These learners are semantic: no bound on the time needed to find a minimizer is claimed.

Main definitions #

Main results #

References #

def Cslib.MachineLearning.PACLearning.IsERM {α : Type u_1} {β : Type u_2} {m : ℕ} [DecidableEq β] (A : Learner α β m) (C : ConceptClass α β) :

The learner A is an empirical risk minimizer for the concept class C: on every labeled sample S it outputs a concept of C whose number of errors on S is minimal among the concepts of C [ShalevShwartzBenDavid2014, Section 2.3].

theorem Cslib.MachineLearning.PACLearning.exists_isERM {α : Type u_1} {β : Type u_2} {m : ℕ} [DecidableEq β] {C : ConceptClass α β} (hC : Set.Nonempty C) :
∃ (A : Learner α β m), IsERM A C

Every nonempty concept class has an empirical risk minimizer.

theorem Cslib.MachineLearning.PACLearning.IsERM.isConsistent {α : Type u_1} {β : Type u_2} {m : ℕ} [DecidableEq β] {A : Learner α β m} {C : ConceptClass α β} (hA : IsERM A C) :

ERM is consistent in the realizable setting: on a sample labeled by a concept of C, an empirical risk minimizer makes no errors, so its output lies in the version space.

theorem Cslib.MachineLearning.PACLearning.exists_isConsistent {α : Type u_1} {β : Type u_2} {m : ℕ} {C : ConceptClass α β} (hC : Set.Nonempty C) :
∃ (A : Learner α β m), IsConsistent A C

Every nonempty concept class has a consistent learner.