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
-
Method Summary
Modifier and TypeMethodDescriptionint
double[]
gradientAt
(double[] x) Computes the gradient forx
.double
valueAt
(double[] x) Computes the function value forx
.
-
Constructor Details
-
L2RegFunction
-
-
Method Details
-
getDimension
public int getDimension()- Specified by:
getDimension
in interfaceFunction
- Returns:
- Retrieves the dimension value.
-
valueAt
public double valueAt(double[] x) Description copied from interface:Function
Computes the function value forx
. -
gradientAt
public double[] gradientAt(double[] x) Description copied from interface:Function
Computes the gradient forx
.- Specified by:
gradientAt
in interfaceFunction
- Parameters:
x
- The input vector.- Returns:
- Returns the computed gradient for
x
.
-