On this page
Finite mixtures of probabilities
Imports 4 library modules and 24 external
- GaussianAnalysis.probability.lindeberg
- GaussianAnalysis.probability.moments
- GaussianAnalysis.probability.conditioning
- GaussianAnalysis.probability.subgaussian
External: HB.structures, mathcomp.classical.all_ssreflect_compat, mathcomp.algebra.algebraic_hierarchy.ssralg, mathcomp.algebra.numeric_hierarchy.ssrnum, mathcomp.boot.finfun, mathcomp.classical.boolp, mathcomp.classical.classical_sets, mathcomp.classical.functions, mathcomp.reals.reals, mathcomp.analysis.ereal, mathcomp.analysis.topology_theory.topology, mathcomp.analysis.normedtype_theory.normedtype, mathcomp.analysis.sequences, mathcomp.analysis.exp, mathcomp.analysis.measure_theory.measure, mathcomp.analysis.lebesgue_measure, mathcomp.analysis.measurable_realfun, mathcomp.analysis.numfun, mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral, mathcomp.analysis.hoelder, mathcomp.analysis.probability_theory.probability, mathcomp.algebra.arithmetic_tactic, mathcomp.algebra.ring_tactic, mathcomp.algebra.field_tactic
Required by 19 files of the paper proofs
- extension/Condition/Countable.v
- extension/Condition/Sat.v
- extension/Condition/Theorem.v
- extension/Condition/Unsat.v
- extension/ConditionKappa/Countable.v
- extension/ConditionKappa/Robust.v
- extension/ConditionKappa/Sat.v
- extension/ConditionKappa/Theorem.v
- extension/ConditionKappa/Unsat.v
- extension/Countable/Continuous.v
- extension/Countable/Robust.v
- extension/Countable/Theorem.v
- extension/Countable/Truncation.v
- extension/Features/Mixture.v
- extension/Mixture/Interpolation.v
- extension/Mixture/Points.v
- extension/Paired/LatentSign.v
- extension/Paired/Law.v
- extension/Sat/Universality.v
The mixture of probabilities P i, i in a finite type I, with weights w i: the law of a variable drawn from P i with probability w i. The weights are nonnegative of sum one, a proof argument of the mixture, as uniform_prob takes a < b.
mixture_ | w i >= 0 for every i and \sum_i w i = 1 |
mixture P hw | for hw : mixture_weights w, the probability A |-> \sum_i w i P i (A) |
Main results:
- mixtureE: mixture P hw A = \sum_i w i P i (A);
- ge0_integral_mixture, integrable_mixture, integral_mixture, expectation_mixture: \int f d(mixture P hw) = \sum_i w i \int f dP_i for f nonnegative and measurable, or integrable under every P i, and then f is integrable under the mixture; Lfun1_mixture and Lfun2_mixture for L^1 and L^2;
- variance_mixture: the law of total variance,
Var X = \sum_i w i (Var_i X + (E_i X - E X)^2);
- subgaussian_mixture, subexponential_mixture: a variable subgaussian (subexponential) with constant K under every P i is so under the mixture;
- distribution_mixture: the image of a mixture by a measurable map is the mixture of the images;
- big_tuple_distr, mixture_weights_prod: \sum over s : n.-tuple I of \prod_k F k (s_k) is \prod_k \sum_i F k i, so the product weights are mixture weights;
- tuple_prod_mixture: the product of n copies of a mixture is the mixture, over the label tuples s with the product weights, of the products tuple_prod (fun k => P (s_k)) n: on boxes by bigA_distr_bigA, then measure_tuple_box_unique;
- mixture_cover: measurable sets E i with P i (E i) <= eps that all contain a set F have a measurable intersection, containing F, of mixture probability at most eps.
Main results
| Results | Statement |
|---|---|
The finite mixture of probabilities P i (i in a finite type) with weights w i >= 0 of sum one, a probability; for f nonnegative and measurable, or integrable under every P i, int f d(mixture) = sum_i w_i int f dP_i, and an integrable (square integrable) variable under every P i is so under the mixture. | |
The law of total variance, Var X = sum_i w_i (Var_i X + (E_i X - E X)^2), for X square integrable under every P i (X \in Lfun (P i) 2); a variable subgaussian (subexponential) with constant K under every P i is so under the mixture; the image of a mixture by a measurable map is the mixture of the images; measurable sets E i with P i (E i) <= eps that all contain F have a measurable intersection, containing F, of mixture probability at most eps. | |
sum_(s : n-tuples) prod_k F k (s_k) = prod_k sum_i F k i, so the product weights prod_k w (s_k) of the label tuples are mixture weights; the product tuple_prod of n copies of a mixture is the mixture, over the label tuples s, of the products tuple_prod (fun k => P (s_k)) n. |
Declarations22 exported, 9 local
forall [I : finType] [R : realType], (I -> R) -> Prop
Definition mixture_weights (I : finType) (R : realType) (w : I -> R) : Prop := (forall i, 0 <= w i) /\ \sum_i w i = 1.
The finite mixture of probabilities P i (i in a finite type) with weights w i >= 0 of sum one, a probability; for f nonnegative and measurable, or integrable under every P i, int f d(mixture) = sum_i w_i int f dP_i, and an integrable (square integrable) variable under every P i is so under the mixture.
Used by 2 declarations in 1 file
- this file: mixture, mixture_weights_prod
Context (I : finType) (R : realType) (w : I -> R) (hw : mixture_weights w).
forall [I : finType] [R : realType] [w : I -> R], mixture_weights w -> forall i : I, 0 <= w i
Statement as written in the source
Lemma mixture_weights_ge0 i : 0 <= w i.
Used by 3 declarations in 2 files
- this file: w0, mixture_weights_prod
- GaussianAnalysis.convex.feature_mixture: w0
forall [I : finType] [R : realType] [w : I -> R], mixture_weights w -> \sum_i w i = 1
Statement as written in the source
Lemma mixture_weights_sum : \sum_i w i = 1.
Used by 8 declarations in 2 files
- this file: mixture_weights_inhabited, mixture_setT, variance_mixture, subgaussian_mixture, subexponential_mixture, mixture_cover, mixture_weights_prod
- GaussianAnalysis.convex.feature_mixture: sum_w
forall [I : finType] [R : realType] [w : I -> R], mixture_weights w -> exists _ : I, true
Weights of sum one live on a nonempty type.
Statement as written in the source
Lemma mixture_weights_inhabited : exists i : I, true.
Used by 5 declarations in 1 file
HB declares canonical projections that the structures of the measure already provide; the warning says so. The setting lasts until the end of this file and is not exported.
Set Warnings "-redundant-canonical-projection".
Context d (T : measurableType d) (R : realType) (I : finType). Variables (w : I -> R) (P : I -> probability T R). Local Open Scope ereal_scope.
forall [d : measure_display] [T : measurableType d] [R : realType] [I : finType] [w : I -> R], (I -> probability T R) -> mixture_weights w -> set T -> \bar R
Definition mixture (hw : mixture_weights w) (A : set T) : \bar R := \sum_i (w i)%:E * P i A.
Stated in the README together with mixture_weights.
Used by 22 declarations in 2 files
- this file: mixture0, mixture_ge0, mixture_sigma_additive, instance at line 115, mixture_setT, instance at line 125, mixtureE, mixture_msum, ge0_integral_mixture, integrable_mixture, integral_mixture, expectation_mixture, Lfun1_mixture, Lfun2_mixture, variance_mixture, subgaussian_mixture, subexponential_mixture, mixture_cover, distribution_mixture, tuple_prod_mixture
- GaussianAnalysis.convex.feature_mixture: mixture_regular_feature_dot, mixture_regular_feature
Variable hw : mixture_weights w.
Let w0 i : (0 <= w i)%R.
Let mixture0 : mixture hw set0 = 0.
Used by 1 declaration in 1 file
- this file: instance at line 115
Let mixture_ge0 A : 0 <= mixture hw A.
Used by 2 declarations in 1 file
- this file: mixture_sigma_additive, instance at line 115
Let mixture_sigma_additive : semi_sigma_additive (mixture hw).
Used by 1 declaration in 1 file
- this file: instance at line 115
HB.instance Definition _ := isMeasure.Build _ _ _ (mixture hw) mixture0 mixture_ge0 mixture_sigma_additive.
Let mixture_setT : mixture hw [set: T] = 1.
Used by 1 declaration in 1 file
- this file: instance at line 125
HB.instance Definition _ := @Measure_isProbability.Build _ _ R (mixture hw) mixture_setT.
forall [d : measure_display] [T : measurableType d] [R : realType] [I : finType] [w : I -> R] (P : I -> probability T R) (hw : mixture_weights w) (A : set T), mixture P hw A = \sum_i ((w i)%:E * P i A)%E
Stated in the README together with mixture_weights.
Statement as written in the source
Lemma mixtureE A : mixture hw A = \sum_i (w i)%:E * P i A.
Used by 2 declarations in 1 file
- this file: mixture_cover, tuple_prod_mixture
Let mterm (k : nat) : {measure set T -> \bar R} := if insub k : option 'I_#|I| is Some o then mscale (NngNum (w0 (enum_val o))) (P (enum_val o)) else mzero.
The mixture as a finite sum of scaled measures, indexed by nat.
Used by 3 declarations in 1 file
- this file: mtermE, mixture_msum, ge0_integral_mixture
Used by 2 declarations in 1 file
- this file: mixture_msum, ge0_integral_mixture
Let sum_enum (F : I -> \bar R) : \sum_i F i = \sum_(k < #|I|) F (enum_val k).
Used by 2 declarations in 1 file
- this file: mixture_msum, ge0_integral_mixture
Used by 1 declaration in 1 file
- this file: ge0_integral_mixture
forall [d : measure_display] [T : measurableType d] [R : realType] [I : finType] [w : I -> R] (P : I -> probability T R) (hw : mixture_weights w) [D : set T] [f : T -> \bar R], d.-measurable D -> measurable_fun D f -> (forall x : T, D x -> (0%R <= f x)%E) -> (\int[mixture P hw]_(x in D) f x)%E = \sum_i ((w i)%:E * \int[P i]_(x in D) f x)%E
Stated in the README together with mixture_weights.
Statement as written in the source
Lemma ge0_integral_mixture (D : set T) (f : T -> \bar R) : measurable D -> measurable_fun D f -> (forall x, D x -> 0 <= f x) -> \int[mixture hw]_(x in D) f x = \sum_i (w i)%:E * \int[P i]_(x in D) f x.
Used by 5 declarations in 2 files
- this file: integrable_mixture, integral_mixture, subgaussian_mixture, subexponential_mixture
- GaussianAnalysis.convex.feature_mixture: mixture_regular_feature_dot
forall [d : measure_display] [T : measurableType d] [R : realType] [I : finType] [w : I -> R] [P : I -> probability T R] (hw : mixture_weights w) [D : set T] [f : T -> \bar R], d.-measurable D -> (forall i : I, (P i).-integrable D f) -> (mixture P hw).-integrable D f
Stated in the README together with mixture_weights.
Statement as written in the source
Lemma integrable_mixture (D : set T) (f : T -> \bar R) : measurable D -> (forall i, (P i).-integrable D f) -> (mixture hw).-integrable D f.
Used by 2 declarations in 1 file
- this file: Lfun1_mixture, Lfun2_mixture
forall [d : measure_display] [T : measurableType d] [R : realType] [I : finType] [w : I -> R] [P : I -> probability T R] (hw : mixture_weights w) [D : set T] [f : T -> \bar R], d.-measurable D -> (forall i : I, (P i).-integrable D f) -> (\int[mixture P hw]_(x in D) f x)%E = \sum_i ((w i)%:E * \int[P i]_(x in D) f x)%E
Stated in the README together with mixture_weights.
Statement as written in the source
Lemma integral_mixture (D : set T) (f : T -> \bar R) : measurable D -> (forall i, (P i).-integrable D f) -> \int[mixture hw]_(x in D) f x = \sum_i (w i)%:E * \int[P i]_(x in D) f x.
Used by 1 declaration in 1 file
- this file: expectation_mixture
forall [d : measure_display] [T : measurableType d] [R : realType] [I : finType] [w : I -> R] [P : I -> probability T R] (hw : mixture_weights w) [X : T -> R], (forall i : I, X \in Lfun (P i) 1) -> ('E_(mixture P hw)[X])%E = \sum_i ((w i)%:E * 'E_(P i)[X])%E
Stated in the README together with mixture_weights.
Statement as written in the source
Lemma expectation_mixture (X : T -> R) : (forall i, X \in Lfun (P i) 1) -> 'E_(mixture hw)[X] = \sum_i (w i)%:E * 'E_(P i)[X].
Used by 2 declarations in 2 files
- this file: variance_mixture
- GaussianAnalysis.convex.feature_mixture: mixture_regular_feature_dot
forall [d : measure_display] [T : measurableType d] [R : realType] [I : finType] [w : I -> R] [P : I -> probability T R] (hw : mixture_weights w) [X : T -> R], (forall i : I, X \in Lfun (P i) 1) -> X \in Lfun (mixture P hw) 1
Stated in the README together with mixture_weights.
Statement as written in the source
Lemma Lfun1_mixture (X : T -> R) : (forall i, X \in Lfun (P i) 1) -> X \in Lfun (mixture hw) 1.
forall [d : measure_display] [T : measurableType d] [R : realType] [I : finType] [w : I -> R] [P : I -> probability T R] (hw : mixture_weights w) [X : T -> R], (forall i : I, X \in Lfun (P i) 2) -> X \in Lfun (mixture P hw) 2
Stated in the README together with mixture_weights.
Statement as written in the source
Lemma Lfun2_mixture (X : T -> R) : (forall i, X \in Lfun (P i) 2%:E) -> X \in Lfun (mixture hw) 2%:E.
Used by 1 declaration in 1 file
- this file: variance_mixture
forall [d : measure_display] [T : measurableType d] [R : realType] [I : finType] [w : I -> R] [P : I -> probability T R] (hw : mixture_weights w) [X : T -> R], (forall i : I, X \in Lfun (P i) 2) -> 'V_(mixture P hw)[X] = \sum_i ((w i)%:E * ('V_(P i)[X] + ('E_(P i)[X] - 'E_(mixture P hw)[X]) ^+ 2))%E
The law of total variance.
The law of total variance, Var X = sum_i w_i (Var_i X + (E_i X - E X)^2), for X square integrable under every P i (X \in Lfun (P i) 2); a variable subgaussian (subexponential) with constant K under every P i is so under the mixture; the image of a mixture by a measurable map is the mixture of the images; measurable sets E i with P i (E i) <= eps that all contain F have a measurable intersection, containing F, of mixture probability at most eps.
Statement as written in the source
Used by 1 declaration in 1 file
- GaussianAnalysis.convex.feature_mixture: mixture_regular_feature_dot
forall [d : measure_display] [T : measurableType d] [R : realType] [I : finType] [w : I -> R] [P : I -> probability T R] (hw : mixture_weights w) [X : T -> R] [K : R], (forall i : I, subgaussian (P i) X K) -> subgaussian (mixture P hw) X K
Stated in the README together with variance_mixture.
Statement as written in the source
Lemma subgaussian_mixture (X : T -> R) (K : R) : (forall i, subgaussian (P i) X K) -> subgaussian (mixture hw) X K.
forall [d : measure_display] [T : measurableType d] [R : realType] [I : finType] [w : I -> R] [P : I -> probability T R] (hw : mixture_weights w) [Y : T -> R] [L : R], (forall i : I, subexponential (P i) Y L) -> subexponential (mixture P hw) Y L
Stated in the README together with variance_mixture.
Statement as written in the source
Lemma subexponential_mixture (Y : T -> R) (L : R) : (forall i, subexponential (P i) Y L) -> subexponential (mixture hw) Y L.
forall [d : measure_display] [T : measurableType d] [R : realType] [I : finType] [w : I -> R] [P : I -> probability T R] (hw : mixture_weights w) [E : I -> set T] [F : set T] [eps : R], (forall i : I, d.-measurable (E i)) -> (forall i : I, F `<=` E i) -> (forall i : I, (P i (E i) <= eps%:E)%E) -> [/\ d.-measurable (\bigcap_i E i), F `<=` \bigcap_i E i & (mixture P hw (\bigcap_i E i) <= eps%:E)%E]
Sets E i of small P i-probability that contain a set F: their intersection is a measurable event of small mixture probability that contains F.
Stated in the README together with variance_mixture.
Statement as written in the source
Lemma mixture_cover (E : I -> set T) (F : set T) (eps : R) : (forall i, measurable (E i)) -> (forall i, F `<=` E i) -> (forall i, P i (E i) <= eps%:E) -> [/\ measurable (\bigcap_(i in [set: I]) E i), F `<=` \bigcap_(i in [set: I]) E i & mixture hw (\bigcap_(i in [set: I]) E i) <= eps%:E].
Context d (T : measurableType d) (R : realType) (I : finType). Variables (w : I -> R) (P : I -> probability T R) (hw : mixture_weights w). Local Open Scope ereal_scope.
forall [d : measure_display] [T : measurableType d] [R : realType] [I : finType] [w : I -> R] (P : I -> probability T R) (hw : mixture_weights w) [d' : measure_display] [T' : measurableType d'] (f : {mfun T >-> T'}) (A : set T'), distribution (mixture P hw) f A = mixture (fun i : I => distribution (P i) f) hw A
The image of a mixture is the mixture of the images.
Stated in the README together with variance_mixture.
forall [R : comPzSemiRingType] [I : finType] [n : nat] (F : 'I_n -> I -> R), \sum_s \prod_(k < n) F k (tnth s k) = \prod_(k < n) \sum_i F k i
A sum over n-tuples of products is a product of sums.
sum_(s : n-tuples) prod_k F k (s_k) = prod_k sum_i F k i, so the product weights prod_k w (s_k) of the label tuples are mixture weights; the product tuple_prod of n copies of a mixture is the mixture, over the label tuples s, of the products tuple_prod (fun k => P (s_k)) n.
Statement as written in the source
Lemma big_tuple_distr (R : comPzSemiRingType) (I : finType) n (F : 'I_n -> I -> R) : \sum_(s : n.-tuple I) \prod_(k < n) F k (tnth s k) = \prod_(k < n) \sum_i F k i.
Used by 3 declarations in 2 files
- this file: mixture_weights_prod, tuple_prod_mixture
- GaussianAnalysis.probability.countable_mixture: label_coupling
forall [I : finType] [R : realType] [w : I -> R] (n : nat), mixture_weights w -> mixture_weights (fun s : n.-tuple I => \prod_(k < n) w (tnth s k))
Stated in the README together with big_tuple_distr.
Statement as written in the source
Lemma mixture_weights_prod (I : finType) (R : realType) (w : I -> R) n : mixture_weights w -> mixture_weights (fun s : n.-tuple I => \prod_(k < n) w (tnth s k)).
Used by 1 declaration in 1 file
- this file: tuple_prod_mixture
Context d (T : measurableType d) (R : realType) (I : finType). Variables (w : I -> R) (P : I -> probability T R) (hw : mixture_weights w). Local Open Scope ereal_scope.
forall [d : measure_display] [T : measurableType d] [R : realType] [I : finType] [w : I -> R] (P : I -> probability T R) (hw : mixture_weights w) (i0 : I) [n : nat] [A : set (n.-tuple T)], (measure_tuple_display d).-measurable A -> tuple_prod (fun=> mixture P hw) n A = \sum_s ((\prod_(k < n) w (tnth s k))%:E * tuple_prod (fun k : nat => P (nth i0 s k)) n A)%E
The product of n copies of a mixture is the mixture, over the label tuples s with weights \prod_k w (s_k), of the products of the P (s_k); i0 is any label, for the indices past n.
Stated in the README together with big_tuple_distr.
Statement as written in the source
Lemma tuple_prod_mixture (i0 : I) n (A : set (n.-tuple T)) : measurable A -> tuple_prod (fun=> mixture P hw) n A = \sum_(s : n.-tuple I) (\prod_(k < n) w (tnth s k))%:E * tuple_prod (fun k => P (nth i0 s k)) n A.