cfahlgren1/math / lean /OAI /Probability /MatroidSecretary /Labels /LabeledHiddenModel.lean
cfahlgren1's picture
download
raw
1.6 kB
import OAI.Probability.MatroidSecretary.Labels.FiniteLabelingModel
namespace OAI
namespace MatroidProphet.Labeling
open Finset
/-- A hidden rule on arbitrary finite labels has the same online information
restriction as the canonical `Fin n` hidden rule. -/
structure LabeledHiddenRule (E : Type*) [Fintype E] [MeasurableSpace E]
(bits : ℕ) where
mask : Seed bits → Finset E
core : LabeledOnlineRule E bits
noncomputable def labeledObserved {E : Type*} [Fintype E] [MeasurableSpace E]
{bits : ℕ} (A : LabeledHiddenRule E bits) (r : Seed bits) (w : E → ℝ) :
E → ℝ := by
classical
exact fun e => if e ∈ A.mask r then w e else 0
noncomputable def labeledHiddenAcceptedThrough
{E : Type*} [Fintype E] [MeasurableSpace E] {bits : ℕ}
(A : LabeledHiddenRule E bits) (r : Seed bits) (w : E → ℝ)
(π : LabeledOrder E) (t : ℕ) : Finset E := by
classical
exact labeledAcceptedThrough A.core r (labeledObserved A r w) w π t \ A.mask r
noncomputable def labeledHiddenReward
{E : Type*} [Fintype E] [MeasurableSpace E] {bits : ℕ}
(A : LabeledHiddenRule E bits) (r : Seed bits) (w : E → ℝ)
(π : LabeledOrder E) : ℝ :=
∑ e ∈ labeledHiddenAcceptedThrough A r w π (Fintype.card E), w e
noncomputable def labeledHiddenWorstReward
{E : Type*} [Fintype E] [MeasurableSpace E] {bits : ℕ}
(A : LabeledHiddenRule E bits) (w : E → ℝ) (r : Seed bits) : ℝ := by
classical
exact Finset.univ.inf' ⟨(Fintype.equivFin E).symm, mem_univ _⟩
(labeledHiddenReward A r w)
end MatroidProphet.Labeling
end OAI

Xet Storage Details

Size:
1.6 kB
·
Xet hash:
8b39ee47b9438317439fb724aebb38282ebac483f2a81a56ddd0a9af4ad7afc9

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.