cc.mallet.classify.constraints.ge
Class MaxEntL2FLGEConstraints
- java.lang.Object
-
- cc.mallet.classify.constraints.ge.MaxEntFLGEConstraints
-
- cc.mallet.classify.constraints.ge.MaxEntL2FLGEConstraints
-
- All Implemented Interfaces:
- MaxEntGEConstraint
public class MaxEntL2FLGEConstraints extends MaxEntFLGEConstraints
Expectation constraint for use with GE. Penalizes L_2^2 difference from target expectation. Multiple constraints are grouped together here to make things more efficient.
-
-
Constructor Summary
Constructors Constructor and Description MaxEntL2FLGEConstraints(int numFeatures, int numLabels, boolean useValues, boolean normalize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddConstraint(int fi, double[] ex, double weight)doublegetValue()Returns the total constraint value.-
Methods inherited from class cc.mallet.classify.constraints.ge.MaxEntFLGEConstraints
computeExpectations, getCompositeConstraintFeatureValue, preProcess, preProcess, zeroExpectations
-
-
-
-
Constructor Detail
-
MaxEntL2FLGEConstraints
public MaxEntL2FLGEConstraints(int numFeatures, int numLabels, boolean useValues, boolean normalize)
-
-
Method Detail
-
getValue
public double getValue()
Description copied from interface:MaxEntGEConstraintReturns the total constraint value.- Returns:
- Constraint value
-
addConstraint
public void addConstraint(int fi, double[] ex, double weight)- Specified by:
addConstraintin classMaxEntFLGEConstraints
-
-
DataMelt 3.0 © DataMelt by jWork.ORG