sgd-0.2.1: Stochastic gradient descent

Safe HaskellNone

Numeric.SGD.LogSigned

Description

Module provides data type for signed log-domain calculations.

Synopsis

Documentation

data LogSigned Source

Signed real value in the logarithmic domain.

Constructors

LogSigned 

Fields

pos :: !LogFloat

Positive component

neg :: !LogFloat

Negative component

logSigned :: Double -> LogSignedSource

Smart LogSigned constructor.

fromPos :: LogFloat -> LogSignedSource

Make LogSigned from a positive, log-domain number.

fromNeg :: LogFloat -> LogSignedSource

Make LogSigned from a negative, log-domain number.

toNorm :: LogSigned -> DoubleSource

Shift LogSigned to a normal domain.

toLogFloat :: LogSigned -> Either LogFloat LogFloatSource

Change the LogSigned to either negative Left LogFloat or positive Right LogFloat.