|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjbil.sequence.AbstractFixedLengthSequenceModel
public abstract class AbstractFixedLengthSequenceModel
Abstract stub implementation of the FixedLengthSequenceModel interface.
Constructor Summary | |
---|---|
AbstractFixedLengthSequenceModel()
|
Method Summary | |
---|---|
double |
likelihood(Sequence word)
Returns the likelihod of the given word under this model. |
double |
likelihood(Sequence word,
int beginIndex,
int endIndex)
Returns the likelihod of the subword of the given word starting at beginIndex and ending at endIndex-1. |
double |
likelihoodThreshold(double significance)
Computes the likelihood threshold for the given significance with a default null model. |
double |
prefixLikelihood(Sequence sequence)
returns the likelihod of the given prefix under this model, that is, the sum of the probabilities of all words starting with the given prefix. |
double |
pvalue(Sequence word)
Returns the p-value of the given word with a default null model (usually the uniform null model). |
double |
pvalue(Sequence word,
int beginIndex)
Returns the p-value of the subword of the given word starting at beginIndex and of the appropriate length with a default null model (typically the uniform model). |
double |
pvalue(Sequence word,
int beginIndex,
int endIndex)
Returns the p-value of the subword of the given word starting at beginIndex and ending at endIndex-1 with a default null model (typically the uniform model). |
double |
pvalue(Sequence word,
int beginIndex,
int endIndex,
SequenceModel nullModel)
Returns the p-value of the subword of the given word starting at beginIndex and ending at endIndex-1. |
double |
pvalue(Sequence word,
SequenceModel nullModel)
The p-value of a given sequence is defined as the probability under a null model for a sequence to have a likelihood greater or equal to the likelihood of the given sequence under this model. |
Sequence |
sample(int length)
Samples a sequence from this model. |
Sequence[] |
sampleN(int sampleSize)
Samples a set of i.i.d. |
Sequence[] |
sampleN(int sampleSize,
int length)
Samples a set of i.i.d. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface jbil.sequence.FixedLengthSequenceModel |
---|
length, likelihood, pvalue, sample |
Methods inherited from interface jbil.sequence.SequenceModel |
---|
getAlphabet, likelihoodThreshold, positionProbability, prefixLikelihood |
Constructor Detail |
---|
public AbstractFixedLengthSequenceModel()
Method Detail |
---|
public double likelihood(Sequence word)
SequenceModel
likelihood
in interface SequenceModel
public double likelihood(Sequence word, int beginIndex, int endIndex)
SequenceModel
likelihood
in interface SequenceModel
public double prefixLikelihood(Sequence sequence)
SequenceModel
prefixLikelihood
in interface SequenceModel
public double pvalue(Sequence word)
SequenceModel
pvalue
in interface SequenceModel
public double pvalue(Sequence word, int beginIndex)
FixedLengthSequenceModel
pvalue
in interface FixedLengthSequenceModel
SequenceModel.pvalue(Sequence, SequenceModel)
public double pvalue(Sequence word, int beginIndex, int endIndex)
SequenceModel
pvalue
in interface SequenceModel
SequenceModel.pvalue(Sequence, SequenceModel)
public double pvalue(Sequence word, SequenceModel nullModel)
SequenceModel
Suppose we have an observed sequence X and we want to perform the statistical test of whether 'X was sampled from the null model' (null hypothesis) against the alternative hypothesis 'X was sampled from this model'. Then the p-value of X is used reject the null hypothesis if it falls below a significance threshold established of the test.
pvalue
in interface SequenceModel
word
- The word whose p-value is to be calculated.nullModel
- The null model.
public double pvalue(Sequence word, int beginIndex, int endIndex, SequenceModel nullModel)
SequenceModel
pvalue
in interface SequenceModel
SequenceModel.pvalue(Sequence, SequenceModel)
public double likelihoodThreshold(double significance)
SequenceModel
likelihoodThreshold
in interface SequenceModel
SequenceModel.likelihoodThreshold(double, SequenceModel)
public Sequence sample(int length)
SequenceModel
sample
in interface SequenceModel
length
- The length of the sequence to be sampled.public Sequence[] sampleN(int sampleSize, int length)
SequenceModel
sampleN
in interface SequenceModel
sampleSize
- The number of sampled sequences.length
- The length of the sampled sequences.public Sequence[] sampleN(int sampleSize)
FixedLengthSequenceModel
sampleN
in interface FixedLengthSequenceModel
sampleSize
- The number of sampled sequences.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |