cc.mallet.fst.semi_supervised.pr
Class PRAuxiliaryModel
java.lang.Object
cc.mallet.fst.Transducer
cc.mallet.fst.semi_supervised.pr.PRAuxiliaryModel
- All Implemented Interfaces:
- java.io.Serializable
public class PRAuxiliaryModel
- extends Transducer
Auxiliar model (q) for E-step/I-projection in Posterior Regularization (PR).
- Author:
- Gregory Druck
- See Also:
- Serialized Form
Method Summary |
PRAuxiliaryModel |
copy()
|
CRF |
getBaseModel()
|
double |
getCompleteValueContribution()
|
PRConstraint |
getConstraint(int index)
|
double |
getParameter(int index)
|
void |
getParameters(double[] params)
|
Transducer.State |
getState(int index)
|
double |
getValue()
|
void |
getValueGradient(double[] gradient)
|
double |
getWeight(int index,
int position,
Sequence input,
Transducer.TransitionIterator iter)
|
void |
incrementTransition(int index,
int position,
Sequence input,
Transducer.TransitionIterator iter,
double prob)
|
java.util.Iterator |
initialStateIterator()
|
int |
numConstraints()
|
int |
numParameters()
|
int |
numStates()
|
void |
preProcess(int index,
int position,
Sequence input)
|
void |
setParameter(int index,
double value)
|
void |
setParameters(double[] params)
|
void |
zeroExpectations()
|
Methods inherited from class cc.mallet.fst.Transducer |
averageTokenAccuracy, canIterateAllTransitions, generatePath, getInputPipe, getMaxLatticeFactory, getOutputPipe, getSumLatticeFactory, isGenerative, label, less_efficient_sumLogProb, no_longer_needed_sumNegLogProb, print, setMaxLatticeFactory, setSumLatticeFactory, stateIndexOfString, sumLogProb, transduce, transduce |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PRAuxiliaryModel
public PRAuxiliaryModel(CRF baseModel,
java.util.ArrayList<PRConstraint> constraints)
copy
public PRAuxiliaryModel copy()
preProcess
public void preProcess(int index,
int position,
Sequence input)
getValue
public double getValue()
getCompleteValueContribution
public double getCompleteValueContribution()
getValueGradient
public void getValueGradient(double[] gradient)
getWeight
public double getWeight(int index,
int position,
Sequence input,
Transducer.TransitionIterator iter)
incrementTransition
public void incrementTransition(int index,
int position,
Sequence input,
Transducer.TransitionIterator iter,
double prob)
zeroExpectations
public void zeroExpectations()
numParameters
public int numParameters()
getParameters
public void getParameters(double[] params)
getParameter
public double getParameter(int index)
setParameters
public void setParameters(double[] params)
setParameter
public void setParameter(int index,
double value)
numConstraints
public int numConstraints()
getConstraint
public PRConstraint getConstraint(int index)
getBaseModel
public CRF getBaseModel()
numStates
public int numStates()
- Specified by:
numStates
in class Transducer
getState
public Transducer.State getState(int index)
- Specified by:
getState
in class Transducer
initialStateIterator
public java.util.Iterator initialStateIterator()
- Specified by:
initialStateIterator
in class Transducer