|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.sequenceScores.statisticalModels.trainable.discrete.inhomogeneous.MEM
public final class MEM
This class represents a maximum entropy model. It should not be used without the MEManager.
| Field Summary | |
|---|---|
protected MEMConstraint[] |
constraints
The specific constraints of this MEM. |
| Constructor Summary | |
|---|---|
MEM(AbstractList<int[]> constr,
int[] allAlphLen,
int[] indices)
The main constructor of a MEM. |
|
MEM(int[] constraint,
int[] allAlphLen,
int[][] cond)
The main constructor of a MEM. |
|
MEM(StringBuffer representation)
The constructor for the Storable interface. |
|
| Method Summary | |
|---|---|
MEM |
clone()
|
double |
getLogPriorPart(double ess)
This method compute the prior for the current parameter ignoring some constants. |
double |
getLogScoreFor(Sequence seq,
int start)
Returns the logarithmic score for the sequence |
double |
getScoreFor(Sequence seq,
int start)
Returns the score for the sequence |
String |
toString(NumberFormat nf)
This method returns some String using a given NumberFormat. |
StringBuffer |
toXML()
This method returns an XML representation as StringBuffer of an
instance of the implementing class. |
void |
train(SequenceIterator s,
byte algo,
TerminationCondition condition,
SafeOutputStream sostream)
This method approximates the distribution either analytically or numerically. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected MEMConstraint[] constraints
| Constructor Detail |
|---|
public MEM(AbstractList<int[]> constr,
int[] allAlphLen,
int[] indices)
constr - the constraintsallAlphLen - the alphabet length of all alphabetsindices - the indices of the positions to be used
public MEM(int[] constraint,
int[] allAlphLen,
int[][] cond)
constraint - the constraintallAlphLen - the alphabet length of all alphabetscond - the conditional fixed positions
public MEM(StringBuffer representation)
throws NonParsableException
Storable interface.
representation - the representation
NonParsableException - if the the StringBuffer could not be parsed.| Method Detail |
|---|
public MEM clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedException
public double getScoreFor(Sequence seq,
int start)
sequence beginning at start.
- Parameters:
seq - the sequencestart - the start position
- Returns:
- the score for the
sequence beginning at start
public double getLogScoreFor(Sequence seq,
int start)
sequence beginning at start.
- Parameters:
seq - the sequencestart - the start position
- Returns:
- the logarithmic score for the
sequence beginning at start
public double getLogPriorPart(double ess)
ess - the ESS to be used
StatisticalModel.getLogPriorTerm()public String toString(NumberFormat nf)
String using a given NumberFormat.
nf - the NumberFormat.
public StringBuffer toXML()
StorableStringBuffer of an
instance of the implementing class.
toXML in interface Storable
public void train(SequenceIterator s,
byte algo,
TerminationCondition condition,
SafeOutputStream sostream)
throws Exception
s - the SequenceIterator used in normalization and numerical approximationalgo - the choice of numerical approximationcondition - the TerminationCondition for stopping the iterative algorithmsostream - a possibility for writing some information
Exception - if something went wrong inside the algorithmsMEMTools
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||