com.github.bruneli.scalaopt.core.gradient
Implements the non-linear conjugate gradient method.
This algorithm is described in Chapter 5 of: "J. Nocedal, S.J. Wright, Numerical Optimization, Springer."
scala> import com.github.bruneli.scalaopt.core._ scala> import gradient.ConjugateGradient._ scala> minimize((x: Variables) => x dot x, Vector(2.0, 4.0)) // Approximate derivatives scala> minimize(((x: Variables) => x dot x, (x: Variables) => x * 2.0), Vector(2.0, 4.0)) // Exact derivatives
Minimize an objective function acting on a vector of real values.
real-valued objective function
initial Variables
algorithm configuration parameters
Variables at a local minimum
Implements the non-linear conjugate gradient method.
This algorithm is described in Chapter 5 of: "J. Nocedal, S.J. Wright, Numerical Optimization, Springer."