|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cc.mallet.fst.semi_supervised.constraints.SelfTransitionGEConstraint
public class SelfTransitionGEConstraint
GE Constraint on the probability of self-transitions in the FST.
Constructor Summary | |
---|---|
SelfTransitionGEConstraint(double selfTransProb,
double weight)
|
Method Summary | |
---|---|
void |
computeExpectations(java.util.ArrayList<SumLattice> lattices)
Compute expectations using cached lattices. |
GEConstraint |
copy()
This is used in multi-threading. |
double |
getCompositeConstraintFeatureValue(FeatureVector fv,
int ip,
int si1,
int si2)
Computes the composite constraint feature value (over all constraint features) for FeatureVector fv and a transition from state li1 to li2. |
double |
getValue()
Returns the total constraint value. |
boolean |
isOneStateConstraint()
|
void |
preProcess(FeatureVector fv)
Gives the constraint the option to do some caching using only the FeatureVector. |
java.util.BitSet |
preProcess(InstanceList data)
|
void |
setStateLabelMap(StateLabelMap map)
Sets that map between the state indices and label indices. |
void |
zeroExpectations()
Zero expectation values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SelfTransitionGEConstraint(double selfTransProb, double weight)
selfTransProb
- Probability of self-transitionweight
- Weight of this constraint in the objective functionMethod Detail |
---|
public GEConstraint copy()
GEConstraint
copy
in interface GEConstraint
public boolean isOneStateConstraint()
isOneStateConstraint
in interface GEConstraint
public void setStateLabelMap(StateLabelMap map)
GEConstraint
setStateLabelMap
in interface GEConstraint
map
- StateLabelMappublic void preProcess(FeatureVector fv)
GEConstraint
preProcess
in interface GEConstraint
fv
- FeatureVector inputpublic java.util.BitSet preProcess(InstanceList data)
preProcess
in interface GEConstraint
data
- Unlabeled data
public double getCompositeConstraintFeatureValue(FeatureVector fv, int ip, int si1, int si2)
GEConstraint
getCompositeConstraintFeatureValue
in interface GEConstraint
fv
- FeatureVector on transitionip
- Position of input in sequencesi1
- Source state index for transitionsi2
- Destination state index for transition
public double getValue()
GEConstraint
getValue
in interface GEConstraint
public void zeroExpectations()
GEConstraint
zeroExpectations
in interface GEConstraint
public void computeExpectations(java.util.ArrayList<SumLattice> lattices)
GEConstraint
computeExpectations
in interface GEConstraint
lattices
- Cached SumLattices
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |