Safe Haskell | None |
---|---|
Language | Haskell2010 |
- walk :: Step x -> x -> Int -> Rand -> Action x IO a b -> IO b
- metropolisHastings :: Kernel a a
- vizMH :: PrintF Double Double
- printMH :: PrintF [Double] [String]
- type Temp = Double
- type CoolingSchedule = Temp -> Temp
- type StateSA a = (a, Temp, CoolingSchedule)
- simulatedAnnealing :: Kernel (StateSA a) a
- vizSA :: PrintF (StateSA Double) Double
- printSA :: PrintF (StateSA [Double]) [String]
- gibbs :: Target a -> [a -> Proposal a] -> Step a
Making the random walk
:: Step x | The stepping style (based on the transition kernel) |
-> x | The starting state |
-> Int | The number of steps to take |
-> Rand | A PRNG |
-> Action x IO a b | An action to take at each step in the walk |
-> IO b | The action-dependent output at the end of the walk |
Execute a random walk and create a Markov chain.
Transition kernels
Metropolis-Hastings
metropolisHastings :: Kernel a a
Simulated Annealing
type CoolingSchedule = Temp -> Temp
This is the tempering function used in the simulated annealing process.
type StateSA a = (a, Temp, CoolingSchedule)
simulatedAnnealing :: Kernel (StateSA a) a