diff --git a/benchmark/SSM.hs b/benchmark/SSM.hs index aa1a8898..c57c8dcb 100644 --- a/benchmark/SSM.hs +++ b/benchmark/SSM.hs @@ -1,5 +1,6 @@ module Main where +import Control.Monad (forM_) import Control.Monad.Bayes.Inference.MCMC import Control.Monad.Bayes.Inference.PMMH as PMMH (pmmh) import Control.Monad.Bayes.Inference.RMSMC (rmsmcDynamic) @@ -18,15 +19,7 @@ main :: IO () main = sampleIOfixed $ do dat <- generateData t let ys = map snd dat - liftIO $ print "SMC" - smcRes <- runAlgFixed ys SMC - liftIO $ print smcRes - liftIO $ print "RM-SMC" - smcrmRes <- runAlgFixed ys RMSMCDynamic - liftIO $ print smcrmRes - liftIO $ print "PMMH" - pmmhRes <- runAlgFixed ys PMMH - liftIO $ print pmmhRes - liftIO $ print "SMC2" - smc2Res <- runAlgFixed ys SMC2 - liftIO $ print $ show smc2Res + forM_ [SMC, RMSMCDynamic, PMMH, SMC2] $ \alg -> do + liftIO $ print alg + result <- runAlgFixed ys alg + liftIO $ putStrLn result