|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cc.mallet.fst.semi_supervised.EntropyLattice
public class EntropyLattice
Runs subsequence constrained forward-backward to compute the entropy of label sequences.
Reference: Gideon Mann, Andrew McCallum "Efficient Computation of Entropy Gradient for Semi-Supervised Conditional Random Fields" HLT/NAACL 2007
Nested Class Summary | |
---|---|
class |
EntropyLattice.LatticeNode
Contains alpha, beta values at a particular input position and state pair. |
Field Summary | |
---|---|
protected double |
entropy
|
protected int |
inputLength
|
protected int |
latticeLength
|
protected EntropyLattice.LatticeNode[][] |
nodes
|
protected int |
numStates
|
protected Transducer |
transducer
|
Constructor Summary | |
---|---|
EntropyLattice(FeatureVectorSequence fvs,
double[][] gammas,
double[][][] xis,
Transducer transducer,
Transducer.Incrementor incrementor,
double scalingFactor)
Runs constrained forward-backward. |
Method Summary | |
---|---|
double |
backwardLattice(double[][] gammas,
double[][][] xis)
Computes the backward entropies (H^beta). |
double |
forwardLattice(double[][] gammas,
double[][][] xis)
Computes the forward entropies (H^alpha). |
double |
getEntropy()
|
EntropyLattice.LatticeNode |
getLatticeNode(int ip,
int si)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int latticeLength
protected int inputLength
protected Transducer transducer
protected int numStates
protected EntropyLattice.LatticeNode[][] nodes
protected double entropy
Constructor Detail |
---|
public EntropyLattice(FeatureVectorSequence fvs, double[][] gammas, double[][][] xis, Transducer transducer, Transducer.Incrementor incrementor, double scalingFactor)
If incrementor is null then do not update expectations due to these computations.
The contribution of entropy to the expectations is multiplies by the scaling factor.
Method Detail |
---|
public double getEntropy()
public double forwardLattice(double[][] gammas, double[][][] xis)
public double backwardLattice(double[][] gammas, double[][][] xis)
public EntropyLattice.LatticeNode getLatticeNode(int ip, int si)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |