Class QNMinimizer.L2RegFunction
java.lang.Object
opennlp.tools.ml.maxent.quasinewton.QNMinimizer.L2RegFunction
- All Implemented Interfaces:
Function
- Enclosing class:
- QNMinimizer
L2-regularized objective
Function.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdouble[]gradientAt(double[] x) Computes the gradient forx.doublevalueAt(double[] x) Computes the function value forx.
-
Constructor Details
-
L2RegFunction
-
-
Method Details
-
getDimension
public int getDimension()- Specified by:
getDimensionin interfaceFunction- Returns:
- Retrieves the dimension value.
-
valueAt
public double valueAt(double[] x) Description copied from interface:FunctionComputes the function value forx. -
gradientAt
public double[] gradientAt(double[] x) Description copied from interface:FunctionComputes the gradient forx.- Specified by:
gradientAtin interfaceFunction- Parameters:
x- The input vector.- Returns:
- Returns the computed gradient for
x.
-