Class MaxEntRangeL2FLGEConstraints.MaxEntL2IndGEConstraint
- java.lang.Object
-
- cc.mallet.classify.constraints.ge.MaxEntRangeL2FLGEConstraints.MaxEntL2IndGEConstraint
-
- Enclosing class:
- MaxEntRangeL2FLGEConstraints
protected class MaxEntRangeL2FLGEConstraints.MaxEntL2IndGEConstraint extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected doublecountprotected double[]expectationprotected intindexprotected java.util.HashMap<java.lang.Integer,java.lang.Integer>labelMapprotected java.util.ArrayList<java.lang.Double>lowerprotected java.util.ArrayList<java.lang.Double>upperprotected java.util.ArrayList<java.lang.Double>weights
-
Constructor Summary
Constructors Constructor Description MaxEntL2IndGEConstraint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int label, double lower, double upper, double weight)doublegetGradientContribution(int li)intgetNumConstrainedLabels()doublegetValue(int li)voidincrementExpectation(int li, double value)
-
-
-
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
-
-
Method Detail
-
add
public void add(int label, double lower, double upper, double weight)
-
incrementExpectation
public void incrementExpectation(int li, double value)
-
getValue
public double getValue(int li)
-
getNumConstrainedLabels
public int getNumConstrainedLabels()
-
getGradientContribution
public double getGradientContribution(int li)
-
-