cc.mallet.fst.semi_supervised.pr.constraints
Class OneLabelL2IndPRConstraints.OneLabelL2IndPRConstraint
java.lang.Object
cc.mallet.fst.semi_supervised.pr.constraints.OneLabelL2IndPRConstraints.OneLabelL2IndPRConstraint
- Enclosing class:
- OneLabelL2IndPRConstraints
protected class OneLabelL2IndPRConstraints.OneLabelL2IndPRConstraint
- 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.Integer> |
labels
|
protected java.util.ArrayList<java.lang.Integer> |
paramIndices
|
protected java.util.ArrayList<java.lang.Double> |
targets
|
protected java.util.ArrayList<java.lang.Double> |
weights
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
OneLabelL2IndPRConstraints.OneLabelL2IndPRConstraint
public OneLabelL2IndPRConstraints.OneLabelL2IndPRConstraint()
copy
public OneLabelL2IndPRConstraints.OneLabelL2IndPRConstraint copy()
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()