goal-graphical-0.20: Optimization of latent variable and dynamical models with Goal

Goal.Graphical.Inference

Description

Infering latent variables in graphical models.

Synopsis

# Inference

conjugatedBayesRule :: forall f y x z w. (Map Natural f x y, Bilinear f y x, ConjugatedLikelihood f y x z w) => (Natural # Affine f y z x) -> (Natural # w) -> SamplePoint z -> Natural # w Source #

The posterior distribution given a prior and likelihood, where the likelihood is conjugated.

# Recursive

Arguments

 :: (Map Natural f x y, Bilinear f y x, ConjugatedLikelihood f y x z w) => (Natural # Affine f y z x) Likelihood -> (Natural # w) Prior -> Sample z Observations -> [Natural # w] Updated prior

The posterior distribution given a prior and likelihood, where the likelihood is conjugated.

# Dynamic

conjugatedPredictionStep :: (ConjugatedLikelihood f x x w w, Bilinear f x x) => (Natural # Affine f x w x) -> (Natural # w) -> Natural # w Source #

The predicted distribution given a current distribution and transition distribution, where the transition distribution is (doubly) conjugated.

Arguments

 :: (ConjugatedLikelihood g x x w w, Bilinear g x x, ConjugatedLikelihood f y x z w, Bilinear f y x, Map Natural g x x, Map Natural f x y) => (Natural # Affine g x w x) Transition Distribution -> (Natural # Affine f y z x) Emission Distribution -> (Natural # w) Beliefs at time $t-1$ -> SamplePoint z Observation at time $t$ -> Natural # w Beliefs at time $t$

Forward inference based on conjugated models: priors at a previous time are first predicted into the current time, and then updated with Bayes rule.

# Conjugation

Arguments

 :: (Map Natural f z x, LegendreExponentialFamily z, ExponentialFamily x) => (Natural # f z x) PPC -> Sample x Sample points -> (Double, Natural # x) Approximate conjugation parameters

Returns the conjugation parameters which best satisfy the conjugation equation for the given population code according to linear regression.

Arguments

 :: ExponentialFamily x => Double Conjugation shift -> (Natural # x) Conjugation parameters -> Sample x Samples points -> [Double] Conjugation curve at sample points

Computes the conjugation curve given a set of conjugation parameters, at the given set of points.