edu.stanford.nlp.ie.crf
Class CRFLogConditionalObjectiveFunction
java.lang.Object
edu.stanford.nlp.optimization.AbstractCachingDiffFunction
edu.stanford.nlp.ie.crf.CRFLogConditionalObjectiveFunction
- All Implemented Interfaces:
- DiffFunction, Function, HasInitial
public class CRFLogConditionalObjectiveFunction
- extends AbstractCachingDiffFunction
- Author:
- Jenny Finkel
Method Summary |
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[] |
to1D(double[][] weights)
|
double[][] |
to2D(double[] weights)
Takes a double array of weights which and creates a 2D array where:
the first element is the mapped index of featuresIndex
the second element is the index of the of the element |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 double sigma
epsilon
protected double epsilon
VERBOSE
public static boolean VERBOSE
domainDimension
public int domainDimension()
- Description copied from interface:
Function
- Returns the number of dimensions in the function's domain
- Specified by:
domainDimension
in interface Function
- Specified by:
domainDimension
in class AbstractCachingDiffFunction
- Returns:
- the number of domain dimensions
to2D
public double[][] to2D(double[] weights)
- Takes a double array of weights which and creates a 2D array where:
the first element is the mapped index of featuresIndex
the second element is the index of the of the element
- Parameters:
weights
-
- Returns:
- a 2D weight array
to1D
public double[] to1D(double[][] weights)
empty2D
public double[][] empty2D()
calculate
public void calculate(double[] x)
- Calculates both value and partial derivatives at the point x, and save them internally.
- Specified by:
calculate
in class AbstractCachingDiffFunction
- Parameters:
x
-
Stanford NLP Group