concat-examples-0.3.0.0: Some examples of compiling to categories
Safe HaskellSafe-Inferred
LanguageHaskell2010

ConCat.GradientDescent

Description

Experimenting with formulations of gradient descent minimization

Synopsis

Documentation

maximize :: (HasV R a, Zip (V R a), Eq a) => R -> D R a R -> a -> a Source #

minimize :: (HasV R a, Zip (V R a), Eq a) => R -> D R a R -> a -> a Source #

maximizeN :: (HasV R a, Zip (V R a), Eq a) => R -> D R a R -> a -> (a, Int) Source #

Optimize a function using gradient ascent, with step count.

minimizeN :: (HasV R a, Zip (V R a), Eq a) => R -> D R a R -> a -> (a, Int) Source #

Optimize a function using gradient ascent, with step count.

chaseN :: (HasV R a, Zip (V R a), Eq a) => R -> (a -> a) -> a -> (a, Int) Source #

chase :: (HasV R a, Zip (V R a), Eq a) => R -> Unop (a -> a) Source #

chaseL :: (HasV R a, Zip (V R a)) => R -> (a -> a) -> a -> [a] Source #

maximizeL :: (HasV R a, Zip (V R a)) => R -> D R a R -> a -> [a] Source #

minimizeL :: (HasV R a, Zip (V R a)) => R -> D R a R -> a -> [a] Source #

fixBy :: (a -> a -> Bool) -> Unop (Unop a) Source #

fixByN :: (a -> a -> Bool) -> Unop a -> a -> (a, Int) Source #

fixN :: Eq a => Unop a -> a -> (a, Int) Source #

fixEq :: Eq a => Unop (Unop a) Source #

(*^) :: (HasV R a, Functor (V R a)) => R -> Unop a infixl 7 Source #

negateV :: (HasV R a, Functor (V R a)) => Unop a Source #

(^+^) :: forall a. (HasV R a, Zip (V R a)) => Binop a infixl 6 Source #

(^-^) :: forall a. (HasV R a, Zip (V R a)) => Binop a infixl 6 Source #