packages feed

optimization 0.1.2 → 0.1.3

raw patch · 3 files changed

+4/−3 lines, 3 files

Files

optimization.cabal view
@@ -1,6 +1,6 @@ name:          optimization category:      Math-version:       0.1.2+version:       0.1.3 license:       BSD3 cabal-version: >= 1.10 license-file:  LICENSE
src/Optimization/LineSearch.hs view
@@ -60,6 +60,7 @@        -> Bool         -- ^ is Armijo condition satisfied? armijo c1 f df x p a =     f (x ^+^ a *^ p) <= f x + c1 * a * (df x `dot` p)+{-# INLINE armijo #-}  -- | Curvature condition curvature :: (Num a, Ord a, Additive f, Metric f)@@ -71,6 +72,7 @@           -> Bool          -- ^ is curvature condition satisfied curvature c2 df x p a =     df (x ^+^ a *^ p) `dot` p >= c2 * (df x `dot` p)+{-# INLINE curvature #-}  -- | Backtracking line search algorithm --
src/Optimization/LineSearch/BFGS.hs view
@@ -11,13 +11,12 @@ import Optimization.LineSearch import Control.Applicative import Data.Traversable-import Data.Distributive import Data.Foldable  -- | Broyden–Fletcher–Goldfarb–Shanno (BFGS) method -- @bfgs search df b0 x0@ where @b0@ is the inverse Hessian (the -- identity is often a good initial value).-bfgs :: ( Metric f, Additive f, Distributive f, Foldable f, Traversable f, Applicative f+bfgs :: ( Metric f, Additive f, Foldable f, Traversable f, Applicative f         , Fractional a, Epsilon a)      => LineSearch f a   -- ^ line search method      -> (f a -> f a)     -- ^ gradient of function