Documentation

LeanMachineLearning.SequentialLearning.ActionIndicator

The action indicator #

actionIndicator A k n ω = šŸ™{A n ω = k} is the {0,1}-valued indicator that action k was chosen at round n. It is the increment weight of every per-action sum attached to an action process: pullCount A k n is its partial sum (sum_range_actionIndicator_eq_pullCount) and sumRewards A Y k n is its reward-weighted partial sum (sum_actionIndicator_mul).

Main definitions #

Main results #

noncomputable def Learning.actionIndicator {Ī© : Type u_1} {š“ : Type u_3} (A : ā„• → Ī© → š“) (k : š“) (n : ā„•) (ω : Ī©) :

The {0,1}-valued assignment indicator of action k: actionIndicator A k n ω = šŸ™{A n ω = k}.

Equations
Instances For
    theorem Learning.actionIndicator_eq_one_iff {Ī© : Type u_1} {š“ : Type u_3} {A : ā„• → Ī© → š“} {k : š“} {n : ā„•} {ω : Ī©} :
    actionIndicator A k n ω = 1 ↔ A n ω = k

    actionIndicator A k n ω = 1 exactly when action k is chosen at time n.

    theorem Learning.actionIndicator_nonneg {Ī© : Type u_1} {š“ : Type u_3} (A : ā„• → Ī© → š“) (k : š“) (n : ā„•) (ω : Ī©) :
    0 ≤ actionIndicator A k n ω
    theorem Learning.actionIndicator_le_one {Ī© : Type u_1} {š“ : Type u_3} (A : ā„• → Ī© → š“) (k : š“) (n : ā„•) (ω : Ī©) :
    actionIndicator A k n ω ≤ 1
    theorem Learning.sum_actionIndicator {Ī© : Type u_1} {š“ : Type u_3} [Fintype š“] (A : ā„• → Ī© → š“) (j : ā„•) (ω : Ī©) :
    āˆ‘ k : š“, actionIndicator A k j ω = 1

    Exactly one arm is pulled at each round, so the indicators sum to 1.

    theorem Learning.sum_actionIndicator_eq_pullCount {Ī© : Type u_1} {š“ : Type u_3} [DecidableEq š“] (A : ā„• → Ī© → š“) (k : š“) (n : ā„•) (ω : Ī©) :
    āˆ‘ j ∈ Finset.range n, actionIndicator A k j ω = ↑(pullCount A k n ω)
    theorem Learning.sum_actionIndicator_smul {Ī© : Type u_1} {š“ : Type u_3} {š“Ø : Type u_4} [DecidableEq š“] [AddCommGroup š“Ø] [Module ā„ š“Ø] (A : ā„• → Ī© → š“) (Y : ā„• → Ī© → š“Ø) (k : š“) (t : ā„•) (ω : Ī©) :
    āˆ‘ j ∈ Finset.range t, actionIndicator A k j ω • Y j ω = sumRewards A Y k t ω
    theorem Learning.sum_actionIndicator_mul {Ī© : Type u_1} {š“ : Type u_3} [DecidableEq š“] (A : ā„• → Ī© → š“) (Y : ā„• → Ī© → ā„) (k : š“) (t : ā„•) (ω : Ī©) :
    āˆ‘ j ∈ Finset.range t, actionIndicator A k j ω * Y j ω = sumRewards A Y k t ω
    theorem Learning.measurable_actionIndicator {Ī© : Type u_1} {š“ : Type u_3} {mĪ© : MeasurableSpace Ī©} {mš“ : MeasurableSpace š“} [MeasurableSingletonClass š“] {A : ā„• → Ī© → š“} (k : š“) {n : ā„•} (hA : Measurable (A n)) :
    theorem Learning.integrable_actionIndicator {Ī© : Type u_1} {š“ : Type u_3} {mĪ© : MeasurableSpace Ī©} {mš“ : MeasurableSpace š“} [MeasurableSingletonClass š“] {A : ā„• → Ī© → š“} (P : MeasureTheory.Measure Ī©) [MeasureTheory.IsFiniteMeasure P] (k : š“) {n : ā„•} (hA : Measurable (A n)) :
    theorem Learning.IsAlgEnvSeq.adapted_actionIndicator {Ī© : Type u_1} {š“ž : Type u_2} {š“ : Type u_3} {š“Ø : Type u_4} {mĪ© : MeasurableSpace Ī©} {mš“ž : MeasurableSpace š“ž} {mš“ : MeasurableSpace š“} {mš“Ø : MeasurableSpace š“Ø} [MeasurableSingletonClass š“] {O : ā„• → Ī© → š“ž} {A : ā„• → Ī© → š“} {Y : ā„• → Ī© → š“Ø} {P : MeasureTheory.Measure Ī©} {alg : Algorithm š“ž š“ š“Ø} {env : Environment š“ž š“ š“Ø} [MeasureTheory.IsFiniteMeasure P] (h : IsAlgEnvSeq O A Y alg env P) (k : š“) :

    The action indicator is adapted to the history filtration: whether action k was chosen at n is known at time n.

    theorem Learning.IsAlgEnvSeq.adapted_actionIndicator_filtrationAction {Ī© : Type u_1} {š“ž : Type u_2} {š“ : Type u_3} {š“Ø : Type u_4} {mĪ© : MeasurableSpace Ī©} {mš“ž : MeasurableSpace š“ž} {mš“ : MeasurableSpace š“} {mš“Ø : MeasurableSpace š“Ø} [MeasurableSingletonClass š“] {O : ā„• → Ī© → š“ž} {A : ā„• → Ī© → š“} {Y : ā„• → Ī© → š“Ø} {P : MeasureTheory.Measure Ī©} {alg : Algorithm š“ž š“ š“Ø} {env : Environment š“ž š“ š“Ø} [MeasureTheory.IsFiniteMeasure P] (h : IsAlgEnvSeq O A Y alg env P) (k : š“) :

    The action indicator is adapted to the history+action filtration: whether action k was chosen at n is known once we know the action at n.