Package edu.stanford.nlp.ie.crf
Class CRFLogConditionalObjectiveFloatFunction
- java.lang.Object
-
- edu.stanford.nlp.optimization.AbstractCachingDiffFloatFunction
-
- edu.stanford.nlp.ie.crf.CRFLogConditionalObjectiveFloatFunction
-
- All Implemented Interfaces:
HasCliquePotentialFunction,DiffFloatFunction,FloatFunction,HasFloatInitial
public class CRFLogConditionalObjectiveFloatFunction extends AbstractCachingDiffFloatFunction implements HasCliquePotentialFunction
- Author:
- Jenny Finkel
-
-
Field Summary
Fields Modifier and Type Field Description protected floatepsilonstatic intHUBER_PRIORstatic intNO_PRIORprotected intpriorstatic intQUADRATIC_PRIORstatic intQUARTIC_PRIORprotected floatsigmastatic booleanVERBOSE-
Fields inherited from class edu.stanford.nlp.optimization.AbstractCachingDiffFloatFunction
derivative, value
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcalculate(float[] x)Calculate the value at x and the derivative and save them in the respective fieldsvoidcalculateWeird1(float[] x)intdomainDimension()Returns the number of dimensions in the function's domainfloat[][]empty2D()static FloatFactorTable[]getCalibratedCliqueTree(float[][] weights, int[][][] data, List<Index<CRFLabel>> labelIndices, int numClasses)CliquePotentialFunctiongetCliquePotentialFunction(double[] x)static FloatFactorTablegetFloatFactorTable(float[][] weights, int[][] data, List<Index<CRFLabel>> labelIndices, int numClasses)float[]to1D(float[][] weights)float[][]to2D(float[] weights)-
Methods inherited from class edu.stanford.nlp.optimization.AbstractCachingDiffFloatFunction
copy, derivativeAt, initial, valueAt
-
-
-
-
Field Detail
-
NO_PRIOR
public static final int NO_PRIOR
- See Also:
- Constant Field Values
-
QUADRATIC_PRIOR
public static final int QUADRATIC_PRIOR
- See Also:
- Constant Field Values
-
HUBER_PRIOR
public static final int HUBER_PRIOR
- See Also:
- Constant Field Values
-
QUARTIC_PRIOR
public static final int QUARTIC_PRIOR
- See Also:
- Constant Field Values
-
prior
protected int prior
-
sigma
protected float sigma
-
epsilon
protected float epsilon
-
VERBOSE
public static boolean VERBOSE
-
-
Method Detail
-
domainDimension
public int domainDimension()
Description copied from interface:FloatFunctionReturns the number of dimensions in the function's domain- Specified by:
domainDimensionin interfaceFloatFunction- Specified by:
domainDimensionin classAbstractCachingDiffFloatFunction- Returns:
- the number of domain dimensions
-
getCliquePotentialFunction
public CliquePotentialFunction getCliquePotentialFunction(double[] x)
- Specified by:
getCliquePotentialFunctionin interfaceHasCliquePotentialFunction
-
to2D
public float[][] to2D(float[] weights)
-
to1D
public float[] to1D(float[][] weights)
-
empty2D
public float[][] empty2D()
-
getFloatFactorTable
public static FloatFactorTable getFloatFactorTable(float[][] weights, int[][] data, List<Index<CRFLabel>> labelIndices, int numClasses)
-
getCalibratedCliqueTree
public static FloatFactorTable[] getCalibratedCliqueTree(float[][] weights, int[][][] data, List<Index<CRFLabel>> labelIndices, int numClasses)
-
calculate
public void calculate(float[] x)
Description copied from class:AbstractCachingDiffFloatFunctionCalculate the value at x and the derivative and save them in the respective fields- Specified by:
calculatein classAbstractCachingDiffFloatFunction
-
calculateWeird1
public void calculateWeird1(float[] x)
-
-