Class OneLabelKLGEConstraints
- java.lang.Object
-
- cc.mallet.fst.semi_supervised.constraints.OneLabelGEConstraints
-
- cc.mallet.fst.semi_supervised.constraints.OneLabelKLGEConstraints
-
- All Implemented Interfaces:
GEConstraint
public class OneLabelKLGEConstraints extends OneLabelGEConstraints
A set of constraints on distributions over consecutive labels conditioned an input features. This is to be used with GE, and penalizes the KL divergence between model and target distributions. Multiple constraints are grouped together here to make things more efficient.- Author:
- Gregory Druck
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
OneLabelKLGEConstraints.OneLabelGEKLConstraint
-
Nested classes/interfaces inherited from class cc.mallet.fst.semi_supervised.constraints.OneLabelGEConstraints
OneLabelGEConstraints.OneLabelGEConstraint
-
-
Field Summary
-
Fields inherited from class cc.mallet.fst.semi_supervised.constraints.OneLabelGEConstraints
cache, constraints, map
-
-
Constructor Summary
Constructors Constructor Description OneLabelKLGEConstraints()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConstraint(int fi, double[] target, double weight)
GEConstraint
copy()
This is used in multi-threading.double
getValue()
Returns the total constraint value.-
Methods inherited from class cc.mallet.fst.semi_supervised.constraints.OneLabelGEConstraints
computeExpectations, getCompositeConstraintFeatureValue, isOneStateConstraint, preProcess, preProcess, setStateLabelMap, zeroExpectations
-
-
-
-
Method Detail
-
copy
public GEConstraint copy()
Description copied from interface:GEConstraint
This is used in multi-threading.- Returns:
- A copy of the GEConstraint.
-
addConstraint
public void addConstraint(int fi, double[] target, double weight)
- Specified by:
addConstraint
in classOneLabelGEConstraints
-
getValue
public double getValue()
Description copied from interface:GEConstraint
Returns the total constraint value.- Specified by:
getValue
in interfaceGEConstraint
- Specified by:
getValue
in classOneLabelGEConstraints
- Returns:
- Constraint value
-
-