edu.stanford.nlp.ie.crf
Class CRFNonLinearLogConditionalObjectiveFunction

java.lang.Object
  extended by edu.stanford.nlp.optimization.AbstractCachingDiffFunction
      extended by edu.stanford.nlp.ie.crf.CRFNonLinearLogConditionalObjectiveFunction
All Implemented Interfaces:
HasCliquePotentialFunction, DiffFunction, Function, HasFeatureGrouping, HasInitial, HasRegularizerParamRange

public class CRFNonLinearLogConditionalObjectiveFunction
extends AbstractCachingDiffFunction
implements HasCliquePotentialFunction, HasFeatureGrouping, HasRegularizerParamRange

Author:
Mengqiu Wang

Field Summary
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
           
 
Fields inherited from class edu.stanford.nlp.optimization.AbstractCachingDiffFunction
derivative, generator, value
 
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[][] 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)
           
 
Methods inherited from class edu.stanford.nlp.optimization.AbstractCachingDiffFunction
clearCache, copy, derivativeAt, getDerivative, gradientCheck, gradientCheck, lastValue, randomInitial, valueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

L1_PRIOR

public static final int L1_PRIOR
See Also:
Constant Field Values

prior

protected int prior

sigma

protected double sigma

epsilon

protected double epsilon

VERBOSE

public static boolean VERBOSE

DEBUG

public static boolean DEBUG

gradientsOnly

public boolean gradientsOnly
Method Detail

getPriorType

public static int getPriorType(java.lang.String priorTypeStr)

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
Returns:
the number of domain dimensions

initial

public double[] initial()
Description copied from interface: HasInitial
Returns the intitial point in the domain (but not necessarily a feasible one).

Specified by:
initial in interface HasInitial
Overrides:
initial in class AbstractCachingDiffFunction
Returns:
a domain point

separateWeights

public Triple<double[][],double[][],double[][]> separateWeights(double[] x)

getCliquePotentialFunction

public CliquePotentialFunction getCliquePotentialFunction(double[] x)
Specified by:
getCliquePotentialFunction in interface HasCliquePotentialFunction

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 - The point at which to calculate the function

getRegularizerParamRange

public java.util.Set<java.lang.Integer> getRegularizerParamRange(double[] x)
Specified by:
getRegularizerParamRange in interface HasRegularizerParamRange

to2D

public double[][] to2D(double[] linearWeights)

empty2D

public double[][] empty2D()

emptyFull2D

public double[][] emptyFull2D()

getFeatureGrouping

public int[][] getFeatureGrouping()
Specified by:
getFeatureGrouping in interface HasFeatureGrouping


Stanford NLP Group