sgd-0.7.0.1: Stochastic gradient descent

Safe HaskellNone
LanguageHaskell98

Numeric.SGD.Momentum

Description

Provides the momentum function which implements stochastic gradient descent with momentum, following:

Synopsis

Documentation

data Config Source #

Momentum configuration

Constructors

Config 

Fields

  • gain0 :: Double

    Initial gain parameter, used to scale the gradient

  • tau :: Double

    After how many gradient calculations the gain parameter is halved

  • gamma :: Double

    Momentum term

Instances
Eq Config Source # 
Instance details

Defined in Numeric.SGD.Momentum

Methods

(==) :: Config -> Config -> Bool #

(/=) :: Config -> Config -> Bool #

Ord Config Source # 
Instance details

Defined in Numeric.SGD.Momentum

Show Config Source # 
Instance details

Defined in Numeric.SGD.Momentum

Generic Config Source # 
Instance details

Defined in Numeric.SGD.Momentum

Associated Types

type Rep Config :: Type -> Type #

Methods

from :: Config -> Rep Config x #

to :: Rep Config x -> Config #

Default Config Source # 
Instance details

Defined in Numeric.SGD.Momentum

Methods

def :: Config #

type Rep Config Source # 
Instance details

Defined in Numeric.SGD.Momentum

momentum Source #

Arguments

:: (Monad m, ParamSet p) 
=> Config

Momentum configuration

-> (e -> p -> p)

Gradient on a training element

-> SGD m e p 

Stochastic gradient descent with momentum. See Numeric.SGD.Momentum for more information.