public class FSMEManager extends MEManager
factorsDEFAULT_STREAM, sostreamparams, trainedalphabets, length| Constructor and Description |
|---|
FSMEManager(FSMEMParameterSet params)
Creates a new
MEManager from a given
MEManagerParameterSet. |
FSMEManager(StringBuffer stringBuff)
The standard constructor for the interface
Storable. |
| Modifier and Type | Method and Description |
|---|---|
String |
getInstanceName()
Should return a short instance name such as iMM(0), BN(2), ...
|
protected String |
getXMLTag()
Returns the XML tag that is used for this model in
DiscreteGraphicalTrainSM.fromXML(StringBuffer) and DiscreteGraphicalTrainSM.toXML(). |
protected void |
set(DGTrainSMParameterSet params,
boolean trained)
Sets the parameters as internal parameters and does some essential
computations.
|
void |
train(DataSet data,
double[] weights)
Trains the
TrainableStatisticalModel object given the data as DataSet using
the specified weights. |
clone, emitDataSet, getFactors, getFactors, getFurtherModelInfos, getLogPriorTerm, getLogProbFor, getNumericalCharacteristics, getStructure, setFurtherModelInfos, toString, trainFactorscheck, setOutputStreamfromXML, getCurrentParameterSet, getDescription, getESS, isInitialized, toXMLgetAlphabetContainer, getCharacteristics, getLength, getLogProbFor, getLogProbFor, getLogScoreFor, getLogScoreFor, getLogScoreFor, getLogScoreFor, getLogScoreFor, getMaximalMarkovOrder, toString, trainpublic FSMEManager(FSMEMParameterSet params) throws CloneNotSupportedException, IllegalArgumentException, NonParsableException
MEManager from a given
MEManagerParameterSet.params - the given parameter setCloneNotSupportedException - if the parameter set could not be clonedIllegalArgumentException - if the parameter set is not instantiatedNonParsableException - if the parameter set is not parsableMEManager.MEManager(MEManagerParameterSet)public FSMEManager(StringBuffer stringBuff) throws NonParsableException
Storable.
Creates a new FSMEManager out of its XML representation.stringBuff - the XML representation as StringBufferNonParsableException - if the FSMEManager could not be reconstructed
out of the XML representation (the StringBuffer could
not be parsed)Storable,
MEManager.MEManager(StringBuffer)public String getInstanceName()
SequenceScorepublic void train(DataSet data, double[] weights) throws Exception
TrainableStatisticalModelTrainableStatisticalModel object given the data as DataSet using
the specified weights. The weight at position i belongs to the element at
position i. So the array weight should have the number of
sequences in the data set as dimension. (Optionally it is possible to use
weight == null if all weights have the value one.)train(data1); train(data2)
should be a fully trained model over data2 and not over
data1+data2. All parameters of the model were given by the
call of the constructor.data - the given sequences as DataSetweights - the weights of the elements, each weight should be
non-negativeException - if the training did not succeed (e.g. the dimension of
weights and the number of sequences in the
data set do not match)DataSet.getElementAt(int),
DataSet.ElementEnumeratorprotected String getXMLTag()
DiscreteGraphicalTrainSMDiscreteGraphicalTrainSM.fromXML(StringBuffer) and DiscreteGraphicalTrainSM.toXML().getXMLTag in class DiscreteGraphicalTrainSMDiscreteGraphicalTrainSM.fromXML(StringBuffer) and
DiscreteGraphicalTrainSM.toXML()DiscreteGraphicalTrainSM.fromXML(StringBuffer),
DiscreteGraphicalTrainSM.toXML()protected void set(DGTrainSMParameterSet params, boolean trained) throws CloneNotSupportedException, NonParsableException
DiscreteGraphicalTrainSMfromParameterSet-methods.set in class InhomogeneousDGTrainSMparams - the new ParameterSettrained - indicates if the model is trained or notCloneNotSupportedException - if the parameter set could not be clonedNonParsableException - if the parameters of the model could not be parsed