|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
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 usedpublic MEM(int[] constraint, int[] allAlphLen, int[][] cond)
constraint
- the constraintallAlphLen
- the alphabet length of all alphabetscond
- the conditional fixed positionspublic 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 Object
CloneNotSupportedException
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
getLogScoreFor
public double getLogScoreFor(Sequence seq,
int start)
- Returns the logarithmic score for the
sequence beginning at start
.
- Parameters:
seq
- the sequencestart
- the start position
- Returns:
- the logarithmic score for the
sequence beginning at start
getLogPriorPart
public double getLogPriorPart(double ess)
- This method compute the prior for the current parameter ignoring some constants.
- Parameters:
ess
- the ESS to be used
- Returns:
- the prior for the current parameter ignoring some constants
- See Also:
StatisticalModel.getLogPriorTerm()
toString
public String toString(NumberFormat nf)
- This method returns some
String
using a given NumberFormat
.
- Parameters:
nf
- the NumberFormat
.
- Returns:
- some String representation
toXML
public StringBuffer toXML()
- Description copied from interface:
Storable
- This method returns an XML representation as
StringBuffer
of an
instance of the implementing class.
- Specified by:
toXML
in interface Storable
- Returns:
- the XML representation
train
public void train(SequenceIterator s,
byte algo,
TerminationCondition condition,
SafeOutputStream sostream)
throws Exception
- This method approximates the distribution either analytically or numerically.
- Parameters:
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
- Throws:
Exception
- if something went wrong inside the algorithms- See Also:
MEMTools
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD