Buckets:
| import Mathlib.Probability.Kernel.Composition.MeasureCompProd | |
| import Mathlib.MeasureTheory.Measure.WithDensity | |
| namespace OAI | |
| open MeasureTheory ProbabilityTheory | |
| open scoped ENNReal | |
| namespace Invariant233.FiniteKernelMixture | |
| variable {I X Y : Type*} [Fintype I] [MeasurableSpace X] [MeasurableSpace Y] | |
| noncomputable def weightedKernel (κ : I → Kernel X Y) (w : I → X → ℝ≥0∞) | |
| (hw : ∀ i, Measurable (w i)) : Kernel X Y where | |
| toFun x := ∑ i, w i x • κ i x | |
| measurable' := by | |
| apply Measure.measurable_of_measurable_coe | |
| intro s hs | |
| simp only [Measure.finsetSum_apply, Measure.smul_apply, smul_eq_mul] | |
| exact Finset.measurable_sum _ (fun i _ => (hw i).mul (Kernel.measurable_coe (κ i) hs)) | |
| noncomputable def normalizedKernel (κ : I → Kernel X Y) (w : I → X → ℝ≥0∞) | |
| (hw : ∀ i, Measurable (w i)) : Kernel X Y := | |
| weightedKernel κ (fun i x => w i x / ∑ j, w j x) | |
| (fun i => (hw i).div (Finset.measurable_sum _ (fun j _ => hw j))) | |
| noncomputable def diagonalReplacementKernel (q : ℝ≥0∞) (p : I → ℝ≥0∞) | |
| (u : I → X → ℝ≥0∞) (hu : ∀ i, Measurable (u i)) | |
| (ν : I → Measure X) : Kernel X X := | |
| normalizedKernel | |
| (fun o : Option I => match o with | |
| | none => Kernel.id | |
| | some i => Kernel.const X (ν i)) | |
| (fun o x => match o with | |
| | none => q | |
| | some i => p i * u i x) | |
| (fun o => by cases o with | |
| | none => exact measurable_const | |
| | some i => exact measurable_const.mul (hu i)) | |
| end Invariant233.FiniteKernelMixture | |
| end OAI | |
Xet Storage Details
- Size:
- 1.56 kB
- Xet hash:
- bd2a0c379acd3b761fa1630a0334f239f28183c70031c0023827fd81eea0ca78
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.