Copyright | 2021 Dominik Schrempf |
---|---|
License | GPL-3.0-or-later |
Maintainer | dominik.schrempf@gmail.com |
Stability | unstable |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Creation date: Tue May 5 20:11:30 2020.
The Metropolis-Hastings-Green (MHG
) algorithm.
For example, see Geyer, C. J., Introduction to Markov chain Monte Carlo, In Handbook of Markov Chain Monte Carlo (pp. 45) (2011). CRC press.
Synopsis
- newtype MHG a = MHG {}
- mhg :: Settings -> PriorFunction a -> LikelihoodFunction a -> Cycle a -> Monitor a -> InitialState a -> StdGen -> IO (MHG a)
- mhgSave :: ToJSON a => AnalysisName -> MHG a -> IO ()
- mhgLoad :: FromJSON a => PriorFunction a -> LikelihoodFunction a -> Cycle a -> Monitor a -> AnalysisName -> IO (MHG a)
- mhgLoadUnsafe :: FromJSON a => PriorFunction a -> LikelihoodFunction a -> Cycle a -> Monitor a -> AnalysisName -> IO (MHG a)
- type MHGRatio = Log Double
- mhgAccept :: MHGRatio -> IOGenM StdGen -> IO Bool
Documentation
The MHG algorithm.
Instances
ToJSON a => Algorithm (MHG a) Source # | |
Defined in Mcmc.Algorithm.MHG aName :: MHG a -> String Source # aIteration :: MHG a -> Int Source # aIsInvalidState :: MHG a -> Bool Source # aIterate :: IterationMode -> ParallelizationMode -> MHG a -> IO (MHG a) Source # aAutoTune :: TuningType -> Int -> MHG a -> IO (MHG a) Source # aResetAcceptance :: ResetAcceptance -> MHG a -> MHG a Source # aCleanAfterBurnIn :: TraceLength -> MHG a -> IO (MHG a) Source # aSummarizeCycle :: IterationMode -> MHG a -> ByteString Source # aOpenMonitors :: AnalysisName -> ExecutionMode -> MHG a -> IO (MHG a) Source # aExecuteMonitors :: Verbosity -> UTCTime -> Int -> MHG a -> IO (Maybe ByteString) Source # aStdMonitorHeader :: MHG a -> ByteString Source # |
mhg :: Settings -> PriorFunction a -> LikelihoodFunction a -> Cycle a -> Monitor a -> InitialState a -> StdGen -> IO (MHG a) Source #
Initialize an MHG algorithm.
NOTE: Computation in the IO
Monad is necessary because the trace is
mutable.
mhgLoad :: FromJSON a => PriorFunction a -> LikelihoodFunction a -> Cycle a -> Monitor a -> AnalysisName -> IO (MHG a) Source #
mhgLoadUnsafe :: FromJSON a => PriorFunction a -> LikelihoodFunction a -> Cycle a -> Monitor a -> AnalysisName -> IO (MHG a) Source #
Like mhgLoad
but do not perform sanity checks.
Also create a backup of the save.
Useful when restarting a run with changed prior function, likelihood function or proposals. Use with care!