|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.models.AbstractModel
de.jstacs.models.discrete.DiscreteGraphicalModel
de.jstacs.models.discrete.inhomogeneous.InhomogeneousDGM
public abstract class InhomogeneousDGM
This class is the main class for all inhomogeneous discrete
graphical models (InhomogeneousDGM).
IDGMParameterSet| Field Summary | |
|---|---|
protected static OutputStream |
DEFAULT_STREAM
The default OutputStream. |
protected SafeOutputStream |
sostream
This stream is used for comments, computation steps/results or any other kind of output during the training, ... etc. |
| Fields inherited from class de.jstacs.models.discrete.DiscreteGraphicalModel |
|---|
params, trained |
| Fields inherited from class de.jstacs.models.AbstractModel |
|---|
alphabets, length |
| Constructor Summary | |
|---|---|
InhomogeneousDGM(IDGMParameterSet params)
Creates a new InhomogeneousDGM from a given
IDGMParameterSet. |
|
InhomogeneousDGM(StringBuffer representation)
The standard constructor for the interface Storable. |
|
| Method Summary | |
|---|---|
protected void |
check(Sequence sequence,
int startpos,
int endpos)
Checks some conditions on a Sequence. |
InhomogeneousDGM |
clone()
Follows the conventions of Object's clone()-method. |
abstract String |
getStructure()
Returns a String representation of the underlying graph. |
protected void |
set(DGMParameterSet parameter,
boolean trained)
Sets the parameters as internal parameters and does some essential computations. |
void |
setOutputStream(OutputStream stream)
Sets the OutputStream for the model. |
| Methods inherited from class de.jstacs.models.discrete.DiscreteGraphicalModel |
|---|
fromXML, getCurrentParameterSet, getDescription, getESS, getFurtherModelInfos, getXMLTag, isTrained, setFurtherModelInfos, toString, toXML |
| Methods inherited from class de.jstacs.models.AbstractModel |
|---|
emitSample, getAlphabetContainer, getCharacteristics, getLength, getLogProbFor, getLogProbFor, getLogProbFor, getLogProbFor, getLogProbFor, getMaximalMarkovOrder, getPriorTerm, getProbFor, getProbFor, set, setNewAlphabetContainerInstance, train |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface de.jstacs.models.Model |
|---|
getInstanceName, getLogPriorTerm, getNumericalCharacteristics, getProbFor, train |
| Field Detail |
|---|
protected SafeOutputStream sostream
protected static final OutputStream DEFAULT_STREAM
OutputStream.
| Constructor Detail |
|---|
public InhomogeneousDGM(IDGMParameterSet params)
throws CloneNotSupportedException,
IllegalArgumentException,
NonParsableException
InhomogeneousDGM from a given
IDGMParameterSet.
params - the given parameter set
CloneNotSupportedException - if the parameter set could not be cloned
IllegalArgumentException - if the parameter set is not instantiated
NonParsableException - if the parameter set is not parsableDiscreteGraphicalModel.DiscreteGraphicalModel(DGMParameterSet)
public InhomogeneousDGM(StringBuffer representation)
throws NonParsableException
Storable.
Creates a new InhomogeneousDGM out of its XML representation.
representation - the XML representation as StringBuffer
NonParsableException - if the InhomogeneousDGM could not be reconstructed
out of the XML representation (the StringBuffer could
not be parsed)Storable,
DiscreteGraphicalModel.DiscreteGraphicalModel(StringBuffer)| Method Detail |
|---|
public InhomogeneousDGM clone()
throws CloneNotSupportedException
AbstractModelObject's clone()-method.
clone in interface Modelclone in class DiscreteGraphicalModelAbstractModel
(the member-AlphabetContainer isn't deeply cloned since
it is assumed to be immutable). The type of the returned object
is defined by the class X directly inherited from
AbstractModel. Hence X's
clone()-method should work as:Object o = (X)super.clone(); o defined by
X that are not of simple data-types like
int, double, ... have to be deeply
copied return o
CloneNotSupportedException - if something went wrong while cloning
public abstract String getStructure()
throws NotTrainedException
String representation of the underlying graph.
String representation of the underlying graph
NotTrainedException - if the structure is not set, this can only be the case if the
model is not trainedpublic void setOutputStream(OutputStream stream)
OutputStream for the model. This stream will sometimes
be used to write some information about the
training/progress/computation... etc. to the screen, a file ... etc.
stream - the OutputStreamSafeOutputStream
protected void check(Sequence sequence,
int startpos,
int endpos)
throws NotTrainedException,
IllegalArgumentException
DiscreteGraphicalModelSequence. These are in general
conditions on the AlphabetContainer of a (sub)
Sequence between startpos und endpos.
check in class DiscreteGraphicalModelsequence - the Sequencestartpos - the startpositionendpos - the endposition
NotTrainedException - if the model is not trained
IllegalArgumentException - if some constraints are not fulfilled
protected void set(DGMParameterSet parameter,
boolean trained)
throws CloneNotSupportedException,
NonParsableException
DiscreteGraphicalModelfromParameterSet-methods.
set in class DiscreteGraphicalModelparameter - the new ParameterSettrained - indicates if the model is trained or not
CloneNotSupportedException - if the parameter set could not be cloned
NonParsableException - if the parameters of the model could not be parsed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||