-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathPopGrowthMCMCMain.hs
41 lines (34 loc) · 1.18 KB
/
PopGrowthMCMCMain.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{-# OPTIONS_GHC -Wall #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE ViewPatterns #-}
module Main (
main
) where
import Diagrams.Prelude
import Diagrams.Backend.CmdLine
import Diagrams.Backend.Cairo.CmdLine
import qualified Data.Vector as V
import qualified Data.ByteString.Lazy as BL
import Data.Csv
import Data.Time
import System.Locale
import Data.Char
import qualified Data.ByteString as B
import Control.Monad
import PopGrowthMCMC
import PopGrowthMCMCChart
displayHeader :: FilePath -> Diagram B R2 -> IO ()
displayHeader fn =
mainRender ( DiagramOpts (Just 900) (Just 700) fn
, DiagramLoopOpts False Nothing 0
)
main :: IO ()
main = do
displayHeader "diagrams/AutoregressionVary1.png"
(diag "Predicted Flow at Kingston Bridge (Varying Parameters)"
(zip [0..] (V.toList $ V.map exp $ V.take 800 flows))
(zip [0..] (V.toList $ V.map exp $ V.take 800 preds)))