public interface SequenceScore extends Cloneable, Storable
AbstractScoreBasedClassifier to classify Sequences by chosing the class with the SequenceScore yielding
the maximum score for the input Sequence.
The most important sub-interfaces are the StatisticalModel for SequenceScores that define a proper, i.e., normalized, likelihood
over the input Sequences, and DifferentiableSequenceScore that can compute the derivation with respect to their parameters.| Modifier and Type | Method and Description |
|---|---|
SequenceScore |
clone()
Creates a clone (deep copy) of the current
SequenceScore instance. |
AlphabetContainer |
getAlphabetContainer()
Returns the container of alphabets that were used when constructing the instance.
|
ResultSet |
getCharacteristics()
Returns some information characterizing or describing the current
instance.
|
String |
getInstanceName()
Should return a short instance name such as iMM(0), BN(2), ...
|
int |
getLength()
Returns the length of sequences this instance can score.
|
double[] |
getLogScoreFor(DataSet data)
This method computes the logarithm of the scores of all sequences
in the given data set.
|
void |
getLogScoreFor(DataSet data,
double[] res)
This method computes and stores the logarithm of the scores for
any sequence in the data set in the given
double-array. |
double |
getLogScoreFor(Sequence seq)
Returns the logarithmic score for the
Sequence seq. |
double |
getLogScoreFor(Sequence seq,
int start)
|
double |
getLogScoreFor(Sequence seq,
int start,
int end)
|
NumericalResultSet |
getNumericalCharacteristics()
Returns the subset of numerical values that are also returned by
getCharacteristics(). |
boolean |
isInitialized()
This method can be used to determine whether the instance is initialized.
|
String |
toString(NumberFormat nf)
This method returns a
String representation of the instance. |
SequenceScore clone() throws CloneNotSupportedException
SequenceScore instance.CloneNotSupportedException - if something went wrong while cloningAlphabetContainer getAlphabetContainer()
String getInstanceName()
int getLength()
ResultSet getCharacteristics() throws Exception
StorableResult.Exception - if some of the characteristics could not be definedStorableResultNumericalResultSet getNumericalCharacteristics() throws Exception
getCharacteristics().Exception - if some of the characteristics could not be defineddouble getLogScoreFor(Sequence seq)
Sequence seq.seq - the sequencedouble getLogScoreFor(Sequence seq, int start)
double[] getLogScoreFor(DataSet data) throws Exception
getLogScoreFor(Sequence).data - the data set of sequencesException - if something went wronggetLogScoreFor(Sequence)void getLogScoreFor(DataSet data, double[] res) throws Exception
double-array.
getLogScoreFor(Sequence).data - the data set of sequencesres - the array for the results, has to have length
data.getNumberOfElements() (which returns the
number of sequences in the data set)Exception - if something went wronggetLogScoreFor(Sequence),
getLogScoreFor(DataSet)boolean isInitialized()
getLogScoreFor(Sequence).true if the instance is initialized, false
otherwiseString toString(NumberFormat nf)
String representation of the instance.nf - the NumberFormat for the String representation of parameters or probabilitiesString representation of the instance