Class OneLabelL2IndPRConstraints.OneLabelL2IndPRConstraint

  • Enclosing class:
    OneLabelL2IndPRConstraints

    protected class OneLabelL2IndPRConstraints.OneLabelL2IndPRConstraint
    extends java.lang.Object
    • Field Detail

      • index

        protected int index
      • count

        protected double count
      • labels

        protected java.util.ArrayList<java.lang.Integer> labels
      • paramIndices

        protected java.util.ArrayList<java.lang.Integer> paramIndices
      • targets

        protected java.util.ArrayList<java.lang.Double> targets
      • weights

        protected java.util.ArrayList<java.lang.Double> weights
      • labelMap

        protected java.util.HashMap<java.lang.Integer,​java.lang.Integer> labelMap
      • expectation

        protected double[] expectation
    • Constructor Detail

      • OneLabelL2IndPRConstraint

        public OneLabelL2IndPRConstraint()
    • Method Detail

      • add

        public void add​(int label,
                        double target,
                        double weight,
                        int paramIndex)
      • zeroExpectation

        public void zeroExpectation()
      • getExpectations

        public void getExpectations​(double[] expectations)
      • addExpectations

        public void addExpectations​(double[] expectations)
      • incrementExpectation

        public void incrementExpectation​(int li,
                                         double value)
      • getScore

        public double getScore​(int li,
                               double[] parameters)
      • getProjectionValueContrib

        public double getProjectionValueContrib​(double[] parameters)
      • getCompleteValueContrib

        public double getCompleteValueContrib()
      • getGradient

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

        public int getNumConstrainedLabels()