|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StatisticalModel
This interface declares methods of a statistical model, i.e., a SequenceScore
that defines a proper likelihood
over the input Sequence
s.
If you like to train the model from a DataSet
, please have a look at TrainableStatisticalModel
,
if you like to use the model in some optimization (e.g., discriminative learning using the GenDisMixClassifier
) have a look at DifferentiableStatisticalModel
.
Method Summary | |
---|---|
DataSet |
emitDataSet(int numberOfSequences,
int... seqLength)
This method returns a DataSet object containing artificial
sequence(s). |
double |
getLogPriorTerm()
Returns a value that is proportional to the log of the prior. |
double |
getLogProbFor(Sequence sequence)
Returns the logarithm of the probability of the given sequence given the model. |
double |
getLogProbFor(Sequence sequence,
int startpos)
Returns the logarithm of the probability of (a part of) the given sequence given the model. |
double |
getLogProbFor(Sequence sequence,
int startpos,
int endpos)
Returns the logarithm of the probability of (a part of) the given sequence given the model. |
byte |
getMaximalMarkovOrder()
This method returns the maximal used Markov order, if possible. |
Methods inherited from interface de.jstacs.sequenceScores.SequenceScore |
---|
clone, getAlphabetContainer, getCharacteristics, getInstanceName, getLength, getLogScoreFor, getLogScoreFor, getLogScoreFor, getLogScoreFor, getLogScoreFor, getNumericalCharacteristics, isInitialized |
Methods inherited from interface de.jstacs.Storable |
---|
toXML |
Method Detail |
---|
double getLogProbFor(Sequence sequence, int startpos, int endpos) throws Exception
getLogProbFor(Sequence, int)
by the fact, that the model could be
e.g. homogeneous and therefore the length of the sequences, whose
probability should be returned, is not fixed. Additionally, the end
position of the part of the given sequence is given and the probability
of the part from position startpos
to endpos
(inclusive) should be returned.
length
and the alphabets
define the type of
data that can be modeled and therefore both has to be checked.
sequence
- the given sequencestartpos
- the start position within the given sequenceendpos
- the last position to be taken into account
Exception
- if the sequence could not be handled (e.g.
startpos >
, endpos
> sequence.length
, ...) by the model
NotTrainedException
- if the model is not trained yetdouble getLogProbFor(Sequence sequence, int startpos) throws Exception
startpos
. E.g. the fixed length is 12. The length
of the given sequence is 30 and the startpos
=15 the logarithm
of the probability of the part from position 15 to 26 (inclusive) given
the model should be returned.
length
and the alphabets
define the type of
data that can be modeled and therefore both has to be checked.
sequence
- the given sequencestartpos
- the start position within the given sequence
Exception
- if the sequence could not be handled by the model
NotTrainedException
- if the model is not trained yetgetLogProbFor(Sequence, int, int)
double getLogProbFor(Sequence sequence) throws Exception
length
and the alphabets
define the type of
data that can be modeled and therefore both has to be checked.
sequence
- the given sequence for which the logarithm of the
probability/the value of the density function should be
returned
Exception
- if the sequence could not be handled by the model
NotTrainedException
- if the model is not trained yetgetLogProbFor(Sequence, int, int)
double getLogPriorTerm() throws Exception
Exception
- if something went wrongDataSet emitDataSet(int numberOfSequences, int... seqLength) throws NotTrainedException, Exception
DataSet
object containing artificial
sequence(s).
emitDataSet( int n, int l )
should return a data set with
n
sequences of length l
.
emitDataSet( int n, int[] l )
should return a data set with
n
sequences which have a sequence length corresponding to
the entry in the given array l
.
emitDataSet( int n )
and
emitDataSet( int n, null )
should return a sample with
n
sequences of length of the model (
SequenceScore.getLength()
).
Exception
.
numberOfSequences
- the number of sequences that should be contained in the
returned sampleseqLength
- the length of the sequences for a homogeneous model; for an
inhomogeneous model this parameter should be null
or an array of size 0.
DataSet
containing the artificial sequence(s)
Exception
- if the emission did not succeed
NotTrainedException
- if the model is not trained yetDataSet
byte getMaximalMarkovOrder() throws UnsupportedOperationException
UnsupportedOperationException
- if the model can't give a proper answer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |