cc.mallet.fst.semi_supervised.constraints
Class OneLabelL2RangeGEConstraints.OneLabelL2IndGEConstraint

java.lang.Object
  extended by cc.mallet.fst.semi_supervised.constraints.OneLabelL2RangeGEConstraints.OneLabelL2IndGEConstraint
Enclosing class:
OneLabelL2RangeGEConstraints

protected class OneLabelL2RangeGEConstraints.OneLabelL2IndGEConstraint
extends java.lang.Object


Field Summary
protected  double count
           
protected  double[] expectation
           
protected  int index
           
protected  java.util.HashMap<java.lang.Integer,java.lang.Integer> labelMap
           
protected  java.util.ArrayList<java.lang.Double> lower
           
protected  java.util.ArrayList<java.lang.Double> upper
           
protected  java.util.ArrayList<java.lang.Double> weights
           
 
Constructor Summary
OneLabelL2RangeGEConstraints.OneLabelL2IndGEConstraint()
           
 
Method Summary
 void add(int label, double lower, double upper, double weight)
           
 double getGradientContribution(int li)
           
 int getNumConstrainedLabels()
           
 double getValueContribution(int li)
           
 void incrementExpectation(int li, double value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

index

protected int index

count

protected double count

lower

protected java.util.ArrayList<java.lang.Double> lower

upper

protected java.util.ArrayList<java.lang.Double> upper

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

OneLabelL2RangeGEConstraints.OneLabelL2IndGEConstraint

public OneLabelL2RangeGEConstraints.OneLabelL2IndGEConstraint()
Method Detail

add

public void add(int label,
                double lower,
                double upper,
                double weight)

incrementExpectation

public void incrementExpectation(int li,
                                 double value)

getValueContribution

public double getValueContribution(int li)

getNumConstrainedLabels

public int getNumConstrainedLabels()

getGradientContribution

public double getGradientContribution(int li)