ConjugateGradient

class ConjugateGradient[T, M](maxNormValue: Double, maxIterations: Int, normSquaredPenalty: Double, tolerance: Double)(implicit space: MutableInnerProductVectorSpace[T, Double], mult: Impl2[M, T, T]) extends SerializableLogging

Solve argmin (a dot x + .5 * x dot (B * x) + .5 * normSquaredPenalty * (x dot x)) for x subject to norm(x) <= maxNormValue

Based on the code from "Trust Region Newton Method for Large-Scale Logistic Regression"

  • @author dlwh
trait Serializable
class Object
trait Matchable
class Any

Type members

Classlikes

case class State

Value members

Concrete methods

def iterations(a: T, B: M, initX: T): Iterator[State]
def minimize(a: T, B: M): T
def minimize(a: T, B: M, initX: T): T
def minimizeAndReturnResidual(a: T, B: M, initX: T): (T, T)

Returns the vector x and the vector r. x is the minimizer, while r is the residual error (which may not be near zero because of the norm constraint.)

Returns the vector x and the vector r. x is the minimizer, while r is the residual error (which may not be near zero because of the norm constraint.)

Inherited methods

protected def logger: LazyLogger
Inherited from
SerializableLogging