Documentation

Linglib.Core.Agent.ProductOfExperts

Product of Experts #

Multiplicative combination of probability distributions.

def Core.ProductOfExperts.productOfExperts {α : Type} (ps : List (α)) (support : List α) :
α

Product of Experts: combine distributions multiplicatively.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    def Core.ProductOfExperts.poe2 {α : Type} (p₁ p₂ : α) (support : List α) :
    α

    Product of two experts.

    Equations
    Instances For
      def Core.ProductOfExperts.poe3 {α : Type} (p₁ p₂ p₃ : α) (support : List α) :
      α

      Product of three experts.

      Equations
      Instances For
        def Core.ProductOfExperts.unnormalizedProduct {α : Type} (ps : List (α)) :
        α

        Unnormalized product: multiply expert scores without normalizing.

        Equations
        Instances For
          def Core.ProductOfExperts.normalizeOver {α : Type} (f : α) (support : List α) :
          α

          Normalize a scoring function over a finite support.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem Core.ProductOfExperts.poe_eq_unnorm_then_norm {α : Type} (ps : List (α)) (support : List α) :

            PoE equals unnormalized product followed by normalization.

            theorem Core.ProductOfExperts.foldl_mul_zero_init {α : Type} (ps : List (α)) (a : α) :
            List.foldl (fun (acc : ) (p : α) => acc * p a) 0 ps = 0

            Folding multiplication with zero accumulator stays zero.

            theorem Core.ProductOfExperts.foldl_mul_zero {α : Type} (ps : List (α)) (a : α) (init : ) (hp : pps, p a = 0) :
            List.foldl (fun (acc : ) (p : α) => acc * p a) init ps = 0

            Folding multiplication absorbs zero.

            theorem Core.ProductOfExperts.poe_single {α : Type} (p : α) (support : List α) :
            productOfExperts [p] support = normalizeOver p support

            PoE with single expert returns normalized version of that expert.

            theorem Core.ProductOfExperts.poe_zero_absorbing {α : Type} (ps : List (α)) (support : List α) (a : α) (hp : pps, p a = 0) :
            productOfExperts ps support a = 0 a'support, productOfExperts ps support a' > 0

            PoE is zero-absorbing: if any expert gives zero, product is zero.

            theorem Core.ProductOfExperts.foldl_add_one {α : Type} (xs : List α) (init : ) :
            List.foldl (fun (acc : ) (x : α) => acc + 1) init xs = init + xs.length

            Foldl adding 1 with any init.

            theorem Core.ProductOfExperts.foldl_add_one_eq_length {α : Type} (xs : List α) :
            List.foldl (fun (acc : ) (x : α) => acc + 1) 0 xs = xs.length

            Foldl adding 1 equals length.

            theorem Core.ProductOfExperts.poe_empty {α : Type} (support : List α) (a : α) :
            productOfExperts [] support a = if support.length = 0 then 0 else 1 / support.length

            PoE with empty expert list gives uniform.

            Linear combination of two values.

            Equations
            Instances For

              Linear combination is NOT zero-absorbing.

              theorem Core.ProductOfExperts.poe2_zero_absorbing {α : Type} (p₁ p₂ : α) (support : List α) (a : α) :
              p₁ a = 0poe2 p₁ p₂ support a = 0 List.foldl (fun (acc : ) (x : α) => acc + p₁ x * p₂ x) 0 support = 0

              PoE IS zero-absorbing (for the 2-expert case).

              def Core.ProductOfExperts.listArgmax {α : Type} (xs : List α) (f : α) :

              Find the element with maximum value according to a scoring function.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                A factored distribution in SDS style.

                • selectionalExpert : α
                • scenarioExpert : α
                • support : List α
                Instances For

                  Combine a factored distribution using PoE.

                  Equations
                  Instances For

                    Get the unnormalized scores.

                    Equations
                    Instances For

                      Detect conflict: experts disagree on the mode.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For

                        Get the degree of conflict between expert modes.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          def Core.ProductOfExperts.weightedPoe {α : Type} (experts : List ((α) × )) (support : List α) :
                          α

                          Weighted PoE: P(x) ∝ Π_i p_i(x)^{β_i}.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            def Core.ProductOfExperts.bayesianPoe {α : Type} (likelihood prior : α) (support : List α) :
                            α

                            Bayesian update as PoE: posterior ∝ likelihood × prior.

                            Equations
                            Instances For

                              Unnormalized PoE is order-independent.

                              theorem Core.ProductOfExperts.poe_comm {α : Type} (p q : α) (support : List α) :
                              productOfExperts [p, q] support = productOfExperts [q, p] support

                              PoE with reordered experts gives same result.