Idris2Doc : Control.Monad.Bayes.Population

Control.Monad.Bayes.Population

(source)

Reexports

importpublic Control.Monad.Bayes.Weighted

Definitions

recordListT : (Type->Type) ->Type->Type
  List transformer

Totality: total
Visibility: public export
Constructor: 
MkListT : m (Lista) ->ListTma

Projection: 
.runListT : ListTma->m (Lista)

Hints:
Applicativem=>Applicative (ListTm)
Functorm=>Functor (ListTm)
Monadm=>Monad (ListTm)
MonadCondm=>MonadCond (ListTm)
MonadInferm=>MonadInfer (ListTm)
MonadSamplem=>MonadSample (ListTm)
MonadTransListT
.runListT : ListTma->m (Lista)
Visibility: public export
runListT : ListTma->m (Lista)
Visibility: public export
recordPopulation : (Type->Type) ->Type->Type
  A collection of weighted samples, or particles.

Totality: total
Visibility: public export
Constructor: 
MkPopulation : Weighted (ListTm) a->Populationma

Projection: 
.runPopulation' : Populationma->Weighted (ListTm) a

Hints:
Monadm=>Applicative (Populationm)
Functorm=>Functor (Populationm)
Monadm=>Monad (Populationm)
Monadm=>MonadCond (Populationm)
MonadSamplem=>MonadInfer (Populationm)
MonadSamplem=>MonadSample (Populationm)
MonadTransPopulation
.runPopulation' : Populationma->Weighted (ListTm) a
Visibility: public export
runPopulation' : Populationma->Weighted (ListTm) a
Visibility: public export
runPopulation : Populationma->m (List (LogDouble, a))
  Explicit representation of the weighted sample with weights in the log domain.

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

Visibility: export
fromWeightedList : Monadm=>m (List (LogDouble, a)) ->Populationma
  Initialize 'Population' with a concrete weighted sample.

Visibility: export
hoist : Monadm2=> (m1x->m2x) ->Populationm1a->Populationm2a
  Applies a transformation to the inner monad.

Visibility: export
spawn : Monadm=>Nat->Populationm ()
  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 : MonadSamplem=> (VectkDouble->m (List (Fink))) ->Populationma->Populationma
Visibility: export
systematic : Double->VectnDouble->List (Finn)
  Systematic sampler.

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

Visibility: export
stratified : MonadSamplem=>VectnDouble->m (List (Finn))
  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 : MonadSamplem=>Populationma->Populationma
  Resample the population using the underlying monad and a stratified resampling scheme.
The total weight is preserved.

Visibility: export
multinomial : MonadSamplem=>VectnDouble->m (List (Finn))
  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 : MonadSamplem=>Populationma->Populationma
  Resample the population using the underlying monad and a multinomial resampling scheme.
The total weight is preserved.

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

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

Visibility: export
proper : MonadSamplem=>Populationma->Weightedma
  A properly weighted single sample, that is one picked at random according
to the weights, with the sum of all weights.

Visibility: export
evidence : Monadm=>Populationma->m (LogDouble)
  Model evidence estimator, also known as pseudo-marginal likelihood.

Visibility: export
collapse : MonadInferm=>Populationma->ma
  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