Documentation

LeanMachineLearning.SequentialLearning.StoppedHistory

Stopping rules and stopped histories #

A stopping rule is a measurable set S : Set (Ī£ n, Hist š“ž š“ š“Ø n) of histories of variable length: the interaction stops after n rounds if the history of these n rounds belongs to S.

Main definitions #

Main results #

def Learning.sigmaHistory {š“ž : Type u_1} {š“ : Type u_2} {š“Ø : Type u_3} {Ī© : Type u_4} (O : ā„• → Ī© → š“ž) (X : ā„• → Ī© → š“) (Y : ā„• → Ī© → š“Ø) (n : ā„•) (ω : Ī©) :
(n : ā„•) Ɨ Hist š“ž š“ š“Ø n

The history of the first n rounds, as a history of variable length in the sigma type Ī£ n : ā„•, Hist š“ž š“ š“Ø n.

Equations
Instances For
    theorem Learning.sigmaHistory_apply {š“ž : Type u_1} {š“ : Type u_2} {š“Ø : Type u_3} {Ī© : Type u_4} {O : ā„• → Ī© → š“ž} {X : ā„• → Ī© → š“} {Y : ā„• → Ī© → š“Ø} (n : ā„•) (ω : Ī©) :
    sigmaHistory O X Y n ω = ⟨n, history O X Y n Ļ‰āŸ©
    @[simp]
    theorem Learning.fst_sigmaHistory {š“ž : Type u_1} {š“ : Type u_2} {š“Ø : Type u_3} {Ī© : Type u_4} {O : ā„• → Ī© → š“ž} {X : ā„• → Ī© → š“} {Y : ā„• → Ī© → š“Ø} (n : ā„•) (ω : Ī©) :
    (sigmaHistory O X Y n ω).fst = n
    theorem Learning.measurable_sigmaHistory {š“ž : Type u_1} {š“ : Type u_2} {š“Ø : Type u_3} {Ī© : Type u_4} {mš“ž : MeasurableSpace š“ž} {mš“ : MeasurableSpace š“} {mš“Ø : MeasurableSpace š“Ø} {mĪ© : MeasurableSpace Ī©} {O : ā„• → Ī© → š“ž} {X : ā„• → Ī© → š“} {Y : ā„• → Ī© → š“Ø} (hO : āˆ€ (n : ā„•), Measurable (O n)) (hX : āˆ€ (n : ā„•), Measurable (X n)) (hY : āˆ€ (n : ā„•), Measurable (Y n)) (n : ā„•) :
    theorem Learning.measurable_hittingAfter_sigmaHistory {š“ž : Type u_1} {š“ : Type u_2} {š“Ø : Type u_3} {Ī© : Type u_4} {mš“ž : MeasurableSpace š“ž} {mš“ : MeasurableSpace š“} {mš“Ø : MeasurableSpace š“Ø} {mĪ© : MeasurableSpace Ī©} {O : ā„• → Ī© → š“ž} {X : ā„• → Ī© → š“} {Y : ā„• → Ī© → š“Ø} {S : Set ((n : ā„•) Ɨ Hist š“ž š“ š“Ø n)} (hO : āˆ€ (n : ā„•), Measurable (O n)) (hX : āˆ€ (n : ā„•), Measurable (X n)) (hY : āˆ€ (n : ā„•), Measurable (Y n)) (hS : MeasurableSet S) :
    theorem Learning.measurable_stoppedValue_sigmaHistory {š“ž : Type u_1} {š“ : Type u_2} {š“Ø : Type u_3} {Ī© : Type u_4} {mš“ž : MeasurableSpace š“ž} {mš“ : MeasurableSpace š“} {mš“Ø : MeasurableSpace š“Ø} {mĪ© : MeasurableSpace Ī©} {O : ā„• → Ī© → š“ž} {X : ā„• → Ī© → š“} {Y : ā„• → Ī© → š“Ø} {Ļ„ : Ī© → WithTop ā„•} (hO : āˆ€ (n : ā„•), Measurable (O n)) (hX : āˆ€ (n : ā„•), Measurable (X n)) (hY : āˆ€ (n : ā„•), Measurable (Y n)) (hĻ„ : Measurable Ļ„) :
    theorem Learning.IsAlgEnvSeq.adapted_sigmaHistory {š“ž : Type u_1} {š“ : Type u_2} {š“Ø : Type u_3} {Ī© : Type u_4} {mš“ž : MeasurableSpace š“ž} {mš“ : MeasurableSpace š“} {mš“Ø : MeasurableSpace š“Ø} {mĪ© : MeasurableSpace Ī©} {O : ā„• → Ī© → š“ž} {X : ā„• → Ī© → š“} {Y : ā„• → Ī© → š“Ø} {alg : Algorithm š“ž š“ š“Ø} {env : Environment š“ž š“ š“Ø} {P : MeasureTheory.Measure Ī©} [MeasureTheory.IsFiniteMeasure P] (h : IsAlgEnvSeq O X Y alg env P) :

    The law of the stopped history #

    The stopping time and the stopped history are functions of the trajectory, whose law is determined by the algorithm and the environment (IsAlgEnvSeq.hasLaw_trajectory). Hence the law of the stopped history is determined by the algorithm and the environment: it is the law stoppedHistMeasure alg env S of the stopped history on the canonical space trajMeasure.

    noncomputable def Learning.stoppedHistMeasure {š“ž : Type u_1} {š“ : Type u_2} {š“Ø : Type u_3} {mš“ž : MeasurableSpace š“ž} {mš“ : MeasurableSpace š“} {mš“Ø : MeasurableSpace š“Ø} (alg : Algorithm š“ž š“ š“Ø) (env : Environment š“ž š“ š“Ø) (S : Set ((n : ā„•) Ɨ Hist š“ž š“ š“Ø n)) :
    MeasureTheory.Measure ((n : ā„•) Ɨ Hist š“ž š“ š“Ø n)

    The law of the history stopped by the stopping rule S, for the algorithm alg in the environment env: the law of the stopped history on the canonical space trajMeasure alg env. This is the law of the stopped history for any algorithm-environment sequence (IsAlgEnvSeq.hasLaw_stoppedValue_sigmaHistory).

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      instance Learning.instIsProbabilityMeasureSigmaNatHistStoppedHistMeasure {š“ž : Type u_1} {š“ : Type u_2} {š“Ø : Type u_3} {mš“ž : MeasurableSpace š“ž} {mš“ : MeasurableSpace š“} {mš“Ø : MeasurableSpace š“Ø} (alg : Algorithm š“ž š“ š“Ø) (env : Environment š“ž š“ š“Ø) (S : Set ((n : ā„•) Ɨ Hist š“ž š“ š“Ø n)) :
      theorem Learning.IsAlgEnvSeq.hasLaw_stoppedValue_sigmaHistory {š“ž : Type u_1} {š“ : Type u_2} {š“Ø : Type u_3} {Ī© : Type u_4} {mš“ž : MeasurableSpace š“ž} {mš“ : MeasurableSpace š“} {mš“Ø : MeasurableSpace š“Ø} {mĪ© : MeasurableSpace Ī©} {alg : Algorithm š“ž š“ š“Ø} {env : Environment š“ž š“ š“Ø} {O : ā„• → Ī© → š“ž} {X : ā„• → Ī© → š“} {Y : ā„• → Ī© → š“Ø} {S : Set ((n : ā„•) Ɨ Hist š“ž š“ š“Ø n)} {P : MeasureTheory.Measure Ī©} [MeasureTheory.IsProbabilityMeasure P] (h : IsAlgEnvSeq O X Y alg env P) (hS : MeasurableSet S) :

      The law of the history stopped by S under any algorithm-environment sequence for alg and env is stoppedHistMeasure alg env S.