hasty-hamiltonian

Speedy gradient-based traversal through parameter space.
Log | Files | Refs | README | LICENSE

commit 1ea6c2438995ab2b716710d56f250ff6ff09ef21
parent b79bf24641fb0929e8f24ec7b455efbfc3238140
Author: Jared Tobin <jared@jtobin.ca>
Date:   Fri, 29 Apr 2016 11:02:38 +1200

Minor version bump.

* Fix project URL error.
* Reduce number of iterations for Rosenbrock, Booth tests.
* Bump stackage LTS versions.

Diffstat:
Mhasty-hamiltonian.cabal | 4++--
Mstack-travis.yaml | 2+-
Mstack.yaml | 2+-
Mtest/Booth.hs | 2+-
Mtest/Rosenbrock.hs | 6+++---
5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/hasty-hamiltonian.cabal b/hasty-hamiltonian.cabal @@ -1,7 +1,7 @@ name: hasty-hamiltonian -version: 1.1.2 +version: 1.1.3 synopsis: Speedy traversal through parameter space. -homepage: http://jtobin.github.com/hasty-hamiltonian +homepage: http://github.com/jtobin/hasty-hamiltonian license: MIT license-file: LICENSE author: Jared Tobin diff --git a/stack-travis.yaml b/stack-travis.yaml @@ -2,7 +2,7 @@ flags: {} packages: - '.' extra-deps: [] -resolver: lts-5.1 +resolver: lts-5.14 compiler: ghc-7.10.3 system-ghc: false install-ghc: true diff --git a/stack.yaml b/stack.yaml @@ -2,4 +2,4 @@ flags: {} packages: - '.' extra-deps: [] -resolver: lts-5.1 +resolver: lts-5.14 diff --git a/test/Booth.hs b/test/Booth.hs @@ -13,5 +13,5 @@ booth :: Target [Double] booth = Target target (Just gTarget) main :: IO () -main = withSystemRandom . asGenIO $ mcmc 10000 0.05 20 [0, 0] booth +main = withSystemRandom . asGenIO $ mcmc 100 0.05 20 [0, 0] booth diff --git a/test/Rosenbrock.hs b/test/Rosenbrock.hs @@ -3,8 +3,8 @@ import Numeric.AD (grad) import Numeric.MCMC.Hamiltonian -target :: RealFloat a => [a] -> a -target [x0, x1] = negate (5 *(x1 - x0 ^ 2) ^ 2 + 0.05 * (1 - x0) ^ 2) +target :: Num a => [a] -> a +target [x0, x1] = negate (100 * (x1 - x0 ^ 2) ^ 2 + (1 - x0) ^ 2) gTarget :: [Double] -> [Double] gTarget = grad target @@ -13,5 +13,5 @@ rosenbrock :: Target [Double] rosenbrock = Target target (Just gTarget) main :: IO () -main = withSystemRandom . asGenIO $ mcmc 3000 0.05 20 [0, 0] rosenbrock +main = withSystemRandom . asGenIO $ mcmc 100 0.05 20 [0, 0] rosenbrock