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: exportexplicitPopulation : Functor m => Population m a -> m (List (Double, a)) Explicit representation of the weighted sample.
Visibility: exportfromWeightedList : Monad m => m (List (Log Double, a)) -> Population m a Initialize 'Population' with a concrete weighted sample.
Visibility: exporthoist : Monad m2 => (m1 x -> m2 x) -> Population m1 a -> Population m2 a Applies a transformation to the inner monad.
Visibility: exportspawn : 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: exportresampleGeneric : 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: exportresampleSystematic : 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: exportstratified : 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: exportresampleStratified : 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: exportmultinomial : 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: exportresampleMultinomial : 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 Separate the sum of weights into the 'Weighted' transformer.
Weights are normalized after this operation.
Visibility: exportpushEvidence : 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: exportproper : 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: exportevidence : Monad m => Population m a -> m (Log Double) Model evidence estimator, also known as pseudo-marginal likelihood.
Visibility: exportcollapse : 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