|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.models.discrete.Constraint
de.jstacs.models.discrete.homogeneous.HomogeneousModel.HomCondProb
protected class HomogeneousModel.HomCondProb
This class handles the (conditional) homogeneous probabilities in a fast way.
| Field Summary |
|---|
| Fields inherited from class de.jstacs.models.discrete.Constraint |
|---|
counts, freq, usedPositions |
| Constructor Summary | |
|---|---|
HomogeneousModel.HomCondProb(HomogeneousModel.HomCondProb old)
This constructor is used for cloning instances, since any instance is an inner instance of a HomogeneousModel. |
|
HomogeneousModel.HomCondProb(int[] pos,
int n)
The main constructor. |
|
HomogeneousModel.HomCondProb(StringBuffer xml)
Creates an instance from a StringBuffer (see Storable). |
|
| Method Summary | |
|---|---|
protected void |
appendAdditionalInfo(StringBuffer xml)
This method appends additional information that are not stored in the base class to the StringBuffer. |
void |
estimate(double ess)
Estimates the (smoothed) relative frequencies using the ess. |
protected void |
estimateUnConditional(int start,
int end,
double pc,
boolean exceptionWhenNoData)
Estimates unconditionally. |
protected void |
extractAdditionalInfo(StringBuffer xml)
This method parses additional information from the StringBuffer that are not parsed in the base class. |
double |
getLnFreq(int index)
Returns the logarithmic frequency. |
protected String |
getXMLTag()
Returns the XML-tag that is used for the class to en- or decode. |
int |
satisfiesSpecificConstraint(Sequence seq,
int start)
This method returns the index of the specific constraint that is fullfilled by the sequence beginning at start. |
String |
toString()
|
| Methods inherited from class de.jstacs.models.discrete.Constraint |
|---|
add, add, clone, getCount, getFreq, getFreq, getMarginalOrder, getNumberOfSpecificConstraints, getPosition, getPositions, reset, toXML |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HomogeneousModel.HomCondProb(int[] pos,
int n)
pos - the used positions (will be cloned), has to be non-negativen - the number of specific constraints
public HomogeneousModel.HomCondProb(StringBuffer xml)
throws NonParsableException
Storable).
xml - the StringBuffer
NonParsableException - if the buffer is not parsablepublic HomogeneousModel.HomCondProb(HomogeneousModel.HomCondProb old)
HomogeneousModel.
old - the old instance to be cloned| Method Detail |
|---|
public void estimate(double ess)
Constraint
estimate in class Constraintess - the ESSpublic double getLnFreq(int index)
index - the index
public int satisfiesSpecificConstraint(Sequence seq,
int start)
Constraintstart.
satisfiesSpecificConstraint in class Constraintseq - the sequencestart - the start position
public String toString()
toString in class Constraintprotected void appendAdditionalInfo(StringBuffer xml)
Constraint
appendAdditionalInfo in class Constraintxml - the StringBuffer that is used for appending additional informationprotected String getXMLTag()
Constraint
getXMLTag in class Constraint
protected void estimateUnConditional(int start,
int end,
double pc,
boolean exceptionWhenNoData)
Constraint
estimateUnConditional in class Constraintstart - the start indexend - the end indexpc - the pseudocount for each parameterexceptionWhenNoData - if true an (runtime) exception is thrown if no data was available to estimate the
parameters
protected void extractAdditionalInfo(StringBuffer xml)
throws NonParsableException
Constraint
extractAdditionalInfo in class Constraintxml - the StringBuffer to parse
NonParsableException - if something with the parsing went wrong
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||