Skip to content

Commit

Permalink
Clean up SSM benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
turion committed May 11, 2023
1 parent 25eb68e commit 9fee117
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions benchmark/SSM.hs
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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

0 comments on commit 9fee117

Please sign in to comment.