Class TwoLabelKLGEConstraints

  • All Implemented Interfaces:
    GEConstraint

    public class TwoLabelKLGEConstraints
    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 KL divergence between model and target distributions. Multiple constraints are grouped together here to make things more efficient.
    Author:
    Gregory Druck
    • Constructor Detail

      • TwoLabelKLGEConstraints

        public TwoLabelKLGEConstraints()
    • 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 class TwoLabelGEConstraints
        Parameters:
        fi - Input feature index
        target - Target distribution over pairs of labels
        weight - Weight of this constraint