mcmc-0.4.0.0: Sample from a posterior using Markov chain Monte Carlo
Copyright(c) Dominik Schrempf 2020
LicenseGPL-3.0-or-later
Maintainerdominik.schrempf@gmail.com
Stabilityunstable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Mcmc.Settings

Description

Creation date: Mon Nov 16 11:13:01 2020.

Synopsis

Data types

burnInIterations :: BurnInSpecification -> Int Source #

Get the number of burn in iterations.

newtype Iterations Source #

Number of normal iterations after burn in.

Note that auto tuning only happens during burn in.

Constructors

Iterations 

Fields

data ExecutionMode Source #

Execution mode.

Constructors

Fail

Perform new run.

Call error if an output files exists.

Overwrite

Perform new run.

Overwrite existing output files.

Continue

Continue a previous run and append to output files.

Call error if an output file does not exist.

openWithExecutionMode :: ExecutionMode -> FilePath -> IO Handle Source #

Open a file honoring the execution mode.

Call error if execution mode is

data ParallelizationMode Source #

Parallelization mode.

Parallel execution of the chains is only beneficial when the algorithm allows for parallelization, and if computation of the next iteration takes a long time. If the calculation of the next state is fast, sequential execution is usually beneficial, even for algorithms involving parallel chains. If the calculation of the next state is slow, parallel execution may be beneficial.

Of course, also the prior or likelihood functions can be computed in parallel. However, this library is not aware of how these functions are computed.

Constructors

Sequential 
Parallel 

data SaveMode Source #

Should the MCMC run be saved at the end of the run?

Constructors

NoSave 
Save 

Instances

Instances details
Eq SaveMode Source # 
Instance details

Defined in Mcmc.Settings

Read SaveMode Source # 
Instance details

Defined in Mcmc.Settings

Show SaveMode Source # 
Instance details

Defined in Mcmc.Settings

ToJSON SaveMode Source # 
Instance details

Defined in Mcmc.Settings

FromJSON SaveMode Source # 
Instance details

Defined in Mcmc.Settings

data Verbosity Source #

Not much to say here.

Constructors

Quiet 
Warn 
Info 
Debug 

Settings

data Settings Source #

Settings of an MCMC sampler.

Instances

Instances details
Eq Settings Source # 
Instance details

Defined in Mcmc.Settings

Show Settings Source # 
Instance details

Defined in Mcmc.Settings

ToJSON Settings Source # 
Instance details

Defined in Mcmc.Settings

FromJSON Settings Source # 
Instance details

Defined in Mcmc.Settings

settingsSave :: Settings -> IO () Source #

Save settings to a file determined by the analysis name.

settingsCheck Source #

Arguments

:: Settings 
-> Int

Current iteration.

-> IO () 

Check settings.

Call error if:

  • The analysis name is the empty string.
  • The number of burn in iterations is negative.
  • Auto tuning period is zero or negative.
  • The number of iterations is negative.
  • The current iteration is larger than the total number of iterations.
  • The current iteration is non-zero but the execution mode is not Continue.
  • The current iteration is zero but the execution mode is Continue.