cc.mallet.fst.semi_supervised.constraints
Class TwoLabelL2GEConstraints
- java.lang.Object
-
- cc.mallet.fst.semi_supervised.constraints.TwoLabelGEConstraints
-
- cc.mallet.fst.semi_supervised.constraints.TwoLabelL2GEConstraints
-
- All Implemented Interfaces:
- GEConstraint
public class TwoLabelL2GEConstraints extends TwoLabelGEConstraints
A set of constraints on distributions over consecutive labels conditioned an input features. This is to be used with GE, and penalizes the L_2^2 difference between model and target distributions. Multiple constraints are grouped together here to make things more efficient.
-
-
Constructor Summary
Constructors Constructor and Description TwoLabelL2GEConstraints()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddConstraint(int fi, double[][] target, double weight)GEConstraintcopy()This is used in multi-threading.doublegetValue()Returns the total constraint value.-
Methods inherited from class cc.mallet.fst.semi_supervised.constraints.TwoLabelGEConstraints
computeExpectations, getCompositeConstraintFeatureValue, isOneStateConstraint, preProcess, preProcess, setStateLabelMap, zeroExpectations
-
-
-
-
Method Detail
-
copy
public GEConstraint copy()
Description copied from interface:GEConstraintThis is used in multi-threading.- Returns:
- A copy of the GEConstraint.
-
addConstraint
public void addConstraint(int fi, double[][] target, double weight)- Specified by:
addConstraintin classTwoLabelGEConstraints- Parameters:
fi- Input feature indextarget- Target distribution over pairs of labelsweight- Weight of this constraint
-
getValue
public double getValue()
Description copied from interface:GEConstraintReturns the total constraint value.- Specified by:
getValuein interfaceGEConstraint- Specified by:
getValuein classTwoLabelGEConstraints- Returns:
- Constraint value
-
-
DataMelt 3.0 © DataMelt by jWork.ORG