| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Goal.Geometry.Differential.GradientPursuit
Description
Gradient pursuit-based optimization on manifolds.
Synopsis
- cauchyLimit :: ((c # x) -> (c # x) -> Double) -> Double -> [c # x] -> c # x
- cauchySequence :: ((c # x) -> (c # x) -> Double) -> Double -> [c # x] -> [c # x]
- vanillaGradient :: Manifold x => (c #* x) -> c # x
- gradientStep :: Manifold x => Double -> (c # x) -> (c # x) -> c # x
- data GradientPursuit
- gradientPursuitStep :: Manifold x => Double -> GradientPursuit -> Int -> (c # x) -> (c # x) -> [c # x] -> (c # x, [c # x])
- gradientSequence :: Riemannian c x => ((c # x) -> c #* x) -> Double -> GradientPursuit -> (c # x) -> [c # x]
- vanillaGradientSequence :: Manifold x => ((c # x) -> c #* x) -> Double -> GradientPursuit -> (c # x) -> [c # x]
- gradientCircuit :: (Monad m, Manifold x) => Double -> GradientPursuit -> Circuit m (c # x, c # x) (c # x)
- vanillaGradientCircuit :: (Monad m, Manifold x) => Double -> GradientPursuit -> Circuit m (c # x, c #* x) (c # x)
- defaultMomentumPursuit :: Double -> GradientPursuit
- defaultAdamPursuit :: GradientPursuit
Cauchy Sequences
Arguments
| :: ((c # x) -> (c # x) -> Double) | Distance (divergence) from previous to next |
| -> Double | Epsilon |
| -> [c # x] | Input sequence |
| -> c # x |
Attempts to calculate the limit of a sequence by finding the iteration with a sufficiently small distance from its previous iteration.
Arguments
| :: ((c # x) -> (c # x) -> Double) | Distance (divergence) from previous to next |
| -> Double | Epsilon |
| -> [c # x] | Input list |
| -> [c # x] | Truncated list |
Attempts to calculate the limit of a sequence. Returns the list up to the limit.
Gradient Pursuit
gradientStep takes a step size, a Point, a tangent vector at that
point, and returns a Point with coordinates that have moved in the
direction of the tangent vector.
Algorithms
data GradientPursuit Source #
An ADT reprenting three basic gradient descent algorithms.
Arguments
| :: Manifold x | |
| => Double | Learning Rate |
| -> GradientPursuit | Gradient pursuit algorithm |
| -> Int | Algorithm step |
| -> (c # x) | The point |
| -> (c # x) | The derivative |
| -> [c # x] | The velocities |
| -> (c # x, [c # x]) | The updated point and velocities |
A single step of a gradient pursuit algorithm.
Arguments
| :: Riemannian c x | |
| => ((c # x) -> c #* x) | Differential calculator |
| -> Double | Step size |
| -> GradientPursuit | Gradient pursuit algorithm |
| -> (c # x) | The initial point |
| -> [c # x] | The gradient ascent |
Gradient ascent based on the Riemannian metric.
vanillaGradientSequence Source #
Arguments
| :: Manifold x | |
| => ((c # x) -> c #* x) | Differential calculator |
| -> Double | Step size |
| -> GradientPursuit | Gradient pursuit algorithm |
| -> (c # x) | The initial point |
| -> [c # x] | The gradient ascent |
Gradient ascent which ignores the Riemannian metric.
Arguments
| :: (Monad m, Manifold x) | |
| => Double | Learning Rate |
| -> GradientPursuit | Gradient pursuit algorithm |
| -> Circuit m (c # x, c # x) (c # x) | (Point, Gradient) to Updated Point |
A Circuit for gradient descent.
vanillaGradientCircuit Source #
Arguments
| :: (Monad m, Manifold x) | |
| => Double | Learning Rate |
| -> GradientPursuit | Gradient pursuit algorithm |
| -> Circuit m (c # x, c #* x) (c # x) | (Point, Gradient) to Updated Point |
A Circuit for gradient descent.
Defaults
defaultMomentumPursuit :: Double -> GradientPursuit Source #
A standard momentum schedule.
defaultAdamPursuit :: GradientPursuit Source #
Standard Adam parameters.