flat-mcmc-0.1.0.0: Painless general-purpose sampling.

Safe HaskellNone

Numeric.MCMC.Flat

Synopsis

Documentation

data MarkovChain Source

State of the Markov chain. Current ensemble position is held in theta, while accepts counts the number of proposals accepted.

Constructors

MarkovChain 

Fields

ensemble :: Ensemble
 
accepts :: !Int
 

Instances

Show MarkovChain

Display the current state. This will be very slow and should be replaced.

data Options Source

Options for the chain. The target (expected to be a log density), as well as the size of the ensemble. The size should be an even number. Also holds the specified parallel granularity as csize.

Constructors

Options 

Fields

_target :: [Double] -> Double
 
_size :: !Int
 
_csize :: !Int
 

type Ensemble = Vector [Double]Source

An ensemble of particles.

runChain :: Options -> Int -> Int -> MarkovChain -> Gen RealWorld -> IO MarkovChainSource

Diffuse through states.

readInits :: FilePath -> IO EnsembleSource

A convenience function to read and parse ensemble inits from disk. Assumes a text file with one particle per line, where each particle element is separated by whitespace.