public class CRFNonLinearLogConditionalObjectiveFunction extends AbstractCachingDiffFunction implements HasCliquePotentialFunction, HasFeatureGrouping, HasRegularizerParamRange
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG |
protected double |
epsilon |
boolean |
gradientsOnly |
static int |
HUBER_PRIOR |
static int |
L1_PRIOR |
static int |
NO_PRIOR |
protected int |
prior |
static int |
QUADRATIC_PRIOR |
static int |
QUARTIC_PRIOR |
protected double |
sigma |
static boolean |
VERBOSE |
derivative, value
Modifier and Type | Method and Description |
---|---|
void |
calculate(double[] x)
Calculates both value and partial derivatives at the point x, and save them internally.
|
int |
domainDimension()
Returns the number of dimensions in the function's domain
|
double[][] |
empty2D() |
double[][] |
emptyFull2D() |
CliquePotentialFunction |
getCliquePotentialFunction(double[] x) |
int[][] |
getFeatureGrouping() |
static int |
getPriorType(java.lang.String priorTypeStr) |
java.util.Set<java.lang.Integer> |
getRegularizerParamRange(double[] x) |
double[] |
initial()
Returns the intitial point in the domain (but not necessarily a feasible one).
|
Triple<double[][],double[][],double[][]> |
separateWeights(double[] x) |
double[][] |
to2D(double[] linearWeights) |
clearCache, copy, derivativeAt, ensure, getDerivative, gradientCheck, gradientCheck, lastValue, randomInitial, valueAt
public static final int NO_PRIOR
public static final int QUADRATIC_PRIOR
public static final int HUBER_PRIOR
public static final int QUARTIC_PRIOR
public static final int L1_PRIOR
protected int prior
protected double sigma
protected double epsilon
public static boolean VERBOSE
public static boolean DEBUG
public boolean gradientsOnly
public static int getPriorType(java.lang.String priorTypeStr)
public int domainDimension()
Function
domainDimension
in interface Function
public double[] initial()
HasInitial
initial
in interface HasInitial
initial
in class AbstractCachingDiffFunction
public Triple<double[][],double[][],double[][]> separateWeights(double[] x)
public CliquePotentialFunction getCliquePotentialFunction(double[] x)
getCliquePotentialFunction
in interface HasCliquePotentialFunction
public void calculate(double[] x)
calculate
in class AbstractCachingDiffFunction
x
- The point at which to calculate the functionpublic java.util.Set<java.lang.Integer> getRegularizerParamRange(double[] x)
getRegularizerParamRange
in interface HasRegularizerParamRange
public double[][] to2D(double[] linearWeights)
public double[][] empty2D()
public double[][] emptyFull2D()
public int[][] getFeatureGrouping()
getFeatureGrouping
in interface HasFeatureGrouping