|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcc.mallet.classify.constraints.pr.MaxEntFLPRConstraints
cc.mallet.classify.constraints.pr.MaxEntL2FLPRConstraints
public class MaxEntL2FLPRConstraints
Expectation constraint for use with Posterior Regularization (PR). Penalizes L_2^2 difference from target distribution.
| Nested Class Summary | |
|---|---|
protected class |
MaxEntL2FLPRConstraints.MaxEntL2FLPRConstraint
|
| Nested classes/interfaces inherited from class cc.mallet.classify.constraints.pr.MaxEntFLPRConstraints |
|---|
MaxEntFLPRConstraints.MaxEntFLPRConstraint |
| Field Summary |
|---|
| Fields inherited from class cc.mallet.classify.constraints.pr.MaxEntFLPRConstraints |
|---|
constraints, indexCache, numFeatures, numLabels, useValues, valueCache |
| Constructor Summary | |
|---|---|
MaxEntL2FLPRConstraints(int numFeatures,
int numLabels,
boolean useValues,
boolean normalize)
|
|
| Method Summary | |
|---|---|
void |
addConstraint(int fi,
double[] ex,
double weight)
|
double |
getAuxiliaryValueContribution(double[] parameters)
|
double |
getCompleteValueContribution()
|
void |
getGradient(double[] parameters,
double[] gradient)
|
double |
getScore(FeatureVector input,
int label,
double[] parameters)
|
int |
numDimensions()
|
| Methods inherited from class cc.mallet.classify.constraints.pr.MaxEntFLPRConstraints |
|---|
incrementExpectations, preProcess, preProcess, zeroExpectations |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MaxEntL2FLPRConstraints(int numFeatures,
int numLabels,
boolean useValues,
boolean normalize)
| Method Detail |
|---|
public void addConstraint(int fi,
double[] ex,
double weight)
addConstraint in class MaxEntFLPRConstraintspublic int numDimensions()
public double getAuxiliaryValueContribution(double[] parameters)
public void getGradient(double[] parameters,
double[] gradient)
public double getCompleteValueContribution()
public double getScore(FeatureVector input,
int label,
double[] parameters)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||