Idris2Doc : Control.Monad.Bayes.Population

Control.Monad.Bayes.Population

(source)

Reexports

import public Control.Monad.Bayes.Weighted

Definitions

record ListT : (Type -> Type) -> Type -> Type
  List transformer

Totality: total
Visibility: public export
Constructor: 
MkListT : m (List a) -> ListT m a

Projection: 
.runListT : ListT m a -> m (List a)

Hints:
Applicative m => Applicative (ListT m)
Functor m => Functor (ListT m)
Monad m => Monad (ListT m)
MonadCond m => MonadCond (ListT m)
MonadInfer m => MonadInfer (ListT m)
MonadSample m => MonadSample (ListT m)
MonadTrans ListT
.runListT : ListT m a -> m (List a)
Visibility: public export
runListT : ListT m a -> m (List a)
Visibility: public export
record Population : (Type -> Type) -> Type -> Type
  A collection of weighted samples, or particles.

Totality: total
Visibility: public export
Constructor: 
MkPopulation : Weighted (ListT m) a -> Population m a

Projection: 
.runPopulation' : Population m a -> Weighted (ListT m) a

Hints:
Monad m => Applicative (Population m)
Functor m => Functor (Population m)
Monad m => Monad (Population m)
Monad m => MonadCond (Population m)
MonadSample m => MonadInfer (Population m)
MonadSample m => MonadSample (Population m)
MonadTrans Population
.runPopulation' : Population m a -> Weighted (ListT m) a
Visibility: public export
runPopulation' : Population m a -> Weighted (ListT m) a
Visibility: public export
runPopulation : Population m a -> m (List (Log Double, a))
  Explicit representation of the weighted sample with weights in the log domain.

Visibility: export
explicitPopulation : Functor m => Population m a -> m (List (Double, a))
  Explicit representation of the weighted sample.

Visibility: export
fromWeightedList : Monad m => m (List (Log Double, a)) -> Population m a
  Initialize 'Population' with a concrete weighted sample.

Visibility: export
hoist : Monad m2 => (m1 x -> m2 x) -> Population m1 a -> Population m2 a
  Applies a transformation to the inner monad.

Visibility: export
spawn : Monad m => Nat -> Population m ()
  Increase the sample size by a given factor.
The weights are adjusted such that their sum is preserved. It is therefore
safe to use 'spawn' in arbitrary places in the program without introducing bias.

Visibility: export
resampleGeneric : MonadSample m => (Vect k Double -> m (List (Fin k))) -> Population m a -> Population m a
Visibility: export
systematic : Double -> Vect n Double -> List (Fin n)
  Systematic sampler.

Visibility: export
resampleSystematic : MonadSample m => Population m a -> Population m a
  Resample the population using the underlying monad and a systematic resampling scheme.
The total weight is preserved.

Visibility: export
stratified : MonadSample m => Vect n Double -> m (List (Fin n))
  The conditional variance of stratified sampling is always smaller than that of multinomial
sampling and it is also unbiased - see [Comparison of Resampling Schemes for Particle
Filtering](https://arxiv.org/abs/cs/0507025).

Visibility: export
resampleStratified : MonadSample m => Population m a -> Population m a
  Resample the population using the underlying monad and a stratified resampling scheme.
The total weight is preserved.

Visibility: export
multinomial : MonadSample m => Vect n Double -> m (List (Fin n))
  Multinomial sampler.  Sample from \(0, \ldots, n - 1\) \(n\)
times drawn at random according to the weights where \(n\) is the
length of vector of weights.

Visibility: export
resampleMultinomial : MonadSample m => Population m a -> Population m a
  Resample the population using the underlying monad and a multinomial resampling scheme.
The total weight is preserved.

Visibility: export
extractEvidence : Monad m => Population m a -> Population (Weighted m) a
  Separate the sum of weights into the 'Weighted' transformer.
Weights are normalized after this operation.

Visibility: export
pushEvidence : MonadCond m => Population m a -> Population m a
  Push the evidence estimator as a score to the transformed monad.
Weights are normalized after this operation.

Visibility: export
proper : MonadSample m => Population m a -> Weighted m a
  A properly weighted single sample, that is one picked at random according
to the weights, with the sum of all weights.

Visibility: export
evidence : Monad m => Population m a -> m (Log Double)
  Model evidence estimator, also known as pseudo-marginal likelihood.

Visibility: export
collapse : MonadInfer m => Population m a -> m a
  Picks one point from the population and uses model evidence as a 'score' in the transformed monad.
This way a single sample can be selected from a population without introducing bias.

Visibility: export