Class MaxEntL2FLPRConstraints

  • All Implemented Interfaces:
    MaxEntPRConstraint

    public class MaxEntL2FLPRConstraints
    extends MaxEntFLPRConstraints
    Expectation constraint for use with Posterior Regularization (PR). Penalizes L_2^2 difference from target distribution.
    Author:
    Gregory Druck
    • Constructor Detail

      • MaxEntL2FLPRConstraints

        public MaxEntL2FLPRConstraints​(int numFeatures,
                                       int numLabels,
                                       boolean useValues,
                                       boolean normalize)
    • Method Detail

      • numDimensions

        public int numDimensions()
      • getAuxiliaryValueContribution

        public double getAuxiliaryValueContribution​(double[] parameters)
      • getGradient

        public void getGradient​(double[] parameters,
                                double[] gradient)
      • getCompleteValueContribution

        public double getCompleteValueContribution()
      • getScore

        public double getScore​(FeatureVector input,
                               int label,
                               double[] parameters)