maxent-learner-hw-0.2.0: Hayes and Wilson's maxent learning algorithm for phonotactic grammars.

Copyright© 2016-2017 George Steel and Peter Jurgec
LicenseGPL-2+
Maintainergeorge.steel@gmail.com
Safe HaskellNone
LanguageHaskell2010

Text.PhonotacticLearner.Util.ConjugateGradient

Description

Implementations of line search and conjugate gradient search for minimization. Line search uses Illinois False Position.

Synopsis

Documentation

traceInline :: String -> a -> a Source #

Version of trace which does not output a trailing linebreak. Good for progress bars.

regulaFalsiSearch Source #

Arguments

:: Double

stoping threshold uncertainty

-> (Vec -> Vec -> Double)

derivative of function to minimize

-> Vec

starting point

-> Vec

direction to search in

-> Vec

minimum point

Line search minimization using a modified Illinois False Position method.

Adapted from description at https://en.wikipedia.org/wiki/False_position_method

conjugateGradientSearch Source #

Arguments

:: Bool

trace progress to stderr if true

-> (Double, Double)

stopping thresholds for conjugate gradient step and line search

-> (Vec -> (Vec, Bool))

function to project points back into area defined by inequality constraints (for unconstrained problems use (x->(x,False)))

-> (Vec -> (Double, Vec))

function to minimize, returns value and gradient

-> (Vec -> Vec -> Double)

partial derivative of function to minimize

-> Vec

starting point

-> Vec

minimum point

Nonlinear conjugate gradient search using Polak-Ribière method. Stopping condition is two steps both havong a delta below the threshold.