Learning.IT.bayesTrajMeasure
This page has the declaration's own card below, then its dependency graph, then a card for each dependency (type dependencies first, then the rest of the transitive closure). For a theorem, the graph and the dependency cards only follow its statement's dependencies (its proof is replaced by sorry, so what it proves doesn't depend on how); for everything else, both the type and the body/value are followed, since their content is part of what later declarations build on.
bayesTrajMeasure๐
Learning.IT.bayesTrajMeasure
A measure P on a measurable space that carries random variables E, A, and Y such that
IsBayesAlgEnvSeq Q ฮบ alg E A Y P.
Learning.IT.bayesTrajMeasure.{u_1, u_2, u_3} {๐ : Type u_1} {๐ : Type u_2} {๐จ : Type u_3} [MeasurableSpace ๐] [MeasurableSpace ๐] [MeasurableSpace ๐จ] (Q : MeasureTheory.Measure ๐) [MeasureTheory.IsProbabilityMeasure Q] (ฮบ : ProbabilityTheory.Kernel (๐ ร ๐) ๐จ) [ProbabilityTheory.IsMarkovKernel ฮบ] (alg : Algorithm ๐ ๐จ) : MeasureTheory.Measure (โ โ ๐ ร ๐ ร ๐จ)Learning.IT.bayesTrajMeasure.{u_1, u_2, u_3} {๐ : Type u_1} {๐ : Type u_2} {๐จ : Type u_3} [MeasurableSpace ๐] [MeasurableSpace ๐] [MeasurableSpace ๐จ] (Q : MeasureTheory.Measure ๐) [MeasureTheory.IsProbabilityMeasure Q] (ฮบ : ProbabilityTheory.Kernel (๐ ร ๐) ๐จ) [ProbabilityTheory.IsMarkovKernel ฮบ] (alg : Algorithm ๐ ๐จ) : MeasureTheory.Measure (โ โ ๐ ร ๐ ร ๐จ)
Code
noncomputable
def bayesTrajMeasure (Q : Measure ๐) [IsProbabilityMeasure Q] (ฮบ : Kernel (๐ ร ๐) ๐จ)
[IsMarkovKernel ฮบ] (alg : Algorithm ๐ ๐จ) : Measure (โ โ ๐ ร ๐ ร ๐จ) :=
trajMeasure (alg.prodLeft ๐) (bayesStationaryEnv Q ฮบ)
deriving IsProbabilityMeasureType uses (1)
Body uses (3)
Used by (5)
Actions: Source ยท Open Issue
Dependency graph
Type dependencies (1)
Algorithm๐
Learning.AlgorithmA stochastic, sequential algorithm.
Learning.Algorithm.{u_4, u_5} (๐ : Type u_4) (๐จ : Type u_5) [MeasurableSpace ๐] [MeasurableSpace ๐จ] : Type (max u_4 u_5)Learning.Algorithm.{u_4, u_5} (๐ : Type u_4) (๐จ : Type u_5) [MeasurableSpace ๐] [MeasurableSpace ๐จ] : Type (max u_4 u_5)
Code
structure Algorithm (๐ ๐จ : Type*) [MeasurableSpace ๐] [MeasurableSpace ๐จ] where /-- Policy or sampling rule: distribution of the next action. -/ policy : (n : โ) โ Kernel (Iic n โ ๐ ร ๐จ) ๐ /-- The policy is a Markov kernel. -/ [h_policy : โ n, IsMarkovKernel (policy n)] /-- Distribution of the first action. -/ p0 : Measure ๐ /-- The first action distribution is a probability measure. -/ [hp0 : IsProbabilityMeasure p0]
Used by (216)
Actions: Source ยท Open Issue
All dependencies, transitively (9)
Environment๐
Learning.EnvironmentA stochastic environment.
Learning.Environment.{u_4, u_5} (๐ : Type u_4) (๐จ : Type u_5) [MeasurableSpace ๐] [MeasurableSpace ๐จ] : Type (max u_4 u_5)Learning.Environment.{u_4, u_5} (๐ : Type u_4) (๐จ : Type u_5) [MeasurableSpace ๐] [MeasurableSpace ๐จ] : Type (max u_4 u_5)
Code
structure Environment (๐ ๐จ : Type*) [MeasurableSpace ๐] [MeasurableSpace ๐จ] where /-- Distribution of the next observation as function of the past history. -/ feedback : (n : โ) โ Kernel ((Iic n โ ๐ ร ๐จ) ร ๐) ๐จ /-- The feedback kernels are Markov kernels. -/ [h_feedback : โ n, IsMarkovKernel (feedback n)] /-- Distribution of the first observation given the first action. -/ ฮฝ0 : Kernel ๐ ๐จ /-- The initial observation kernel is a Markov kernel. -/ [hp0 : IsMarkovKernel ฮฝ0]
Actions: Source ยท Open Issue
stepKernel๐
Learning.stepKernel
Kernel describing the distribution of the next action-feedback pair given the history
up to n.
Learning.stepKernel.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (alg : Algorithm ๐ ๐จ) (env : Environment ๐ ๐จ) (n : โ) : ProbabilityTheory.Kernel (โฅ(Finset.Iic n) โ ๐ ร ๐จ) (๐ ร ๐จ)Learning.stepKernel.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (alg : Algorithm ๐ ๐จ) (env : Environment ๐ ๐จ) (n : โ) : ProbabilityTheory.Kernel (โฅ(Finset.Iic n) โ ๐ ร ๐จ) (๐ ร ๐จ)
Code
noncomputable
def stepKernel (alg : Algorithm ๐ ๐จ) (env : Environment ๐ ๐จ) (n : โ) :
Kernel (Iic n โ ๐ ร ๐จ) (๐ ร ๐จ) :=
alg.policy n โโ env.feedback n
deriving IsMarkovKernelType uses (2)
Actions: Source ยท Open Issue
instIsMarkovKernelForallSubtypeNatMemFinsetIicProdPolicy๐
Learning.instIsMarkovKernelForallSubtypeNatMemFinsetIicProdPolicyNo docstring.
Learning.instIsMarkovKernelForallSubtypeNatMemFinsetIicProdPolicy.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (alg : Algorithm ๐ ๐จ) (n : โ) : ProbabilityTheory.IsMarkovKernel (Algorithm.policy alg n)Learning.instIsMarkovKernelForallSubtypeNatMemFinsetIicProdPolicy.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (alg : Algorithm ๐ ๐จ) (n : โ) : ProbabilityTheory.IsMarkovKernel (Algorithm.policy alg n)
Code
instance (alg : Algorithm ๐ ๐จ) (n : โ) : IsMarkovKernel (alg.policy n)
Type uses (1)
Actions: Source ยท Open Issue
Proof
alg.h_policy n
instIsMarkovKernelProdForallSubtypeNatMemFinsetIicFeedback๐
Learning.instIsMarkovKernelProdForallSubtypeNatMemFinsetIicFeedbackNo docstring.
Learning.instIsMarkovKernelProdForallSubtypeNatMemFinsetIicFeedback.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (env : Environment ๐ ๐จ) (n : โ) : ProbabilityTheory.IsMarkovKernel (Environment.feedback env n)Learning.instIsMarkovKernelProdForallSubtypeNatMemFinsetIicFeedback.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (env : Environment ๐ ๐จ) (n : โ) : ProbabilityTheory.IsMarkovKernel (Environment.feedback env n)
Code
instance (env : Environment ๐ ๐จ) (n : โ) : IsMarkovKernel (env.feedback n)
Type uses (1)
Used by (5)
Actions: Source ยท Open Issue
Proof
env.h_feedback n
instIsMarkovKernelForallSubtypeNatMemFinsetIicProdStepKernel๐
Learning.instIsMarkovKernelForallSubtypeNatMemFinsetIicProdStepKernelNo docstring.
Learning.instIsMarkovKernelForallSubtypeNatMemFinsetIicProdStepKernel.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (alg : Algorithm ๐ ๐จ) (env : Environment ๐ ๐จ) (n : โ) : ProbabilityTheory.IsMarkovKernel (stepKernel alg env n)Learning.instIsMarkovKernelForallSubtypeNatMemFinsetIicProdStepKernel.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (alg : Algorithm ๐ ๐จ) (env : Environment ๐ ๐จ) (n : โ) : ProbabilityTheory.IsMarkovKernel (stepKernel alg env n)
Code
deriving IsMarkovKernel
Type uses (3)
Body uses (2)
Used by (10)
Actions: Source ยท Open Issue
Proof
deriving IsMarkovKernel
trajMeasure๐
Learning.trajMeasureMeasure on the sequence of actions and observations generated by the algorithm/environment.
Learning.trajMeasure.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (alg : Algorithm ๐ ๐จ) (env : Environment ๐ ๐จ) : MeasureTheory.Measure (โ โ ๐ ร ๐จ)Learning.trajMeasure.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (alg : Algorithm ๐ ๐จ) (env : Environment ๐ ๐จ) : MeasureTheory.Measure (โ โ ๐ ร ๐จ)
Code
noncomputable
def trajMeasure (alg : Algorithm ๐ ๐จ) (env : Environment ๐ ๐จ) :
Measure (โ โ ๐ ร ๐จ) :=
Kernel.trajMeasure (alg.p0 โโ env.ฮฝ0) (stepKernel alg env)
deriving IsProbabilityMeasureType uses (2)
Used by (19)
Actions: Source ยท Open Issue
instIsProbabilityMeasureP0๐
Learning.instIsProbabilityMeasureP0No docstring.
Learning.instIsProbabilityMeasureP0.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (alg : Algorithm ๐ ๐จ) : MeasureTheory.IsProbabilityMeasure (Algorithm.p0 alg)Learning.instIsProbabilityMeasureP0.{u_1, u_2} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (alg : Algorithm ๐ ๐จ) : MeasureTheory.IsProbabilityMeasure (Algorithm.p0 alg)
Code
instance (alg : Algorithm ๐ ๐จ) : IsProbabilityMeasure alg.p0
Type uses (1)
Used by (13)
Actions: Source ยท Open Issue
Proof
alg.hp0
prodLeft๐
Learning.Algorithm.prodLeft
An algorithm with observations in ๐ง ร ๐จ obtained from an algorithm with observations in ๐จ
by ignoring the ๐ง component of each observation.
Learning.Algorithm.prodLeft.{u_1, u_2, u_4} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (๐ง : Type u_4) [MeasurableSpace ๐ง] (alg : Algorithm ๐ ๐จ) : Algorithm ๐ (๐ง ร ๐จ)Learning.Algorithm.prodLeft.{u_1, u_2, u_4} {๐ : Type u_1} {๐จ : Type u_2} {m๐ : MeasurableSpace ๐} {m๐จ : MeasurableSpace ๐จ} (๐ง : Type u_4) [MeasurableSpace ๐ง] (alg : Algorithm ๐ ๐จ) : Algorithm ๐ (๐ง ร ๐จ)
Code
def Algorithm.prodLeft (๐ง : Type*) [MeasurableSpace ๐ง] (alg : Algorithm ๐ ๐จ) :
Algorithm ๐ (๐ง ร ๐จ) where
policy n := (alg.policy n).comap (fun h i โฆ ((h i).1, (h i).2.2)) (by fun_prop)
p0 := alg.p0Type uses (1)
Used by (6)
Actions: Source ยท Open Issue
bayesStationaryEnv๐
Learning.bayesStationaryEnv
An environment with observations in ๐ ร ๐จ. The first element e of an observation is
sampled from Q once and remains constant. The second element of an observation is sampled from
ฮบ (e, a), where a is the corresponding action.
Learning.bayesStationaryEnv.{u_1, u_2, u_3} {๐ : Type u_1} {๐ : Type u_2} {๐จ : Type u_3} [MeasurableSpace ๐] [MeasurableSpace ๐] [MeasurableSpace ๐จ] (Q : MeasureTheory.Measure ๐) [MeasureTheory.IsProbabilityMeasure Q] (ฮบ : ProbabilityTheory.Kernel (๐ ร ๐) ๐จ) [ProbabilityTheory.IsMarkovKernel ฮบ] : Environment ๐ (๐ ร ๐จ)Learning.bayesStationaryEnv.{u_1, u_2, u_3} {๐ : Type u_1} {๐ : Type u_2} {๐จ : Type u_3} [MeasurableSpace ๐] [MeasurableSpace ๐] [MeasurableSpace ๐จ] (Q : MeasureTheory.Measure ๐) [MeasureTheory.IsProbabilityMeasure Q] (ฮบ : ProbabilityTheory.Kernel (๐ ร ๐) ๐จ) [ProbabilityTheory.IsMarkovKernel ฮบ] : Environment ๐ (๐ ร ๐จ)
Code
noncomputable
def bayesStationaryEnv (Q : Measure ๐) [IsProbabilityMeasure Q] (ฮบ : Kernel (๐ ร ๐) ๐จ)
[IsMarkovKernel ฮบ] : Environment ๐ (๐ ร ๐จ) where
feedback n :=
let g : (Iic n โ ๐ ร ๐ ร ๐จ) ร ๐ โ ๐ ร ๐ := fun (h, a) => ((h โจ0, by simpโฉ).2.1, a)
(Kernel.deterministic (Prod.fst โ g) (by fun_prop)) รโ (ฮบ.comap g (by fun_prop))
ฮฝ0 := (Kernel.const _ Q) โโ ฮบ.swapLeftType uses (1)
Used by (4)
Actions: Source ยท Open Issue