Class 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.
    Author:
    Gregory Druck
    • Constructor Detail

      • TwoLabelL2GEConstraints

        public TwoLabelL2GEConstraints()
    • 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