public class InhomogeneousMarkov extends Measure
BayesianNetworkDiffSM
that is an inhomogeneous Markov model. The order of the Markov model can be
defined by the user. A Markov model of order 0 is also known as
position weight matrix (PWM), a Markov model of order 1 is also
known as weight array matrix (WAM) model.| Modifier and Type | Class and Description |
|---|---|
static class |
InhomogeneousMarkov.InhomogeneousMarkovParameterSet
Class for an
InstanceParameterSet that defines the parameters of
an InhomogeneousMarkov structure Measure. |
Measure.MeasureParameterSetparameters| Constructor and Description |
|---|
InhomogeneousMarkov(InhomogeneousMarkov.InhomogeneousMarkovParameterSet parameters)
|
InhomogeneousMarkov(int order)
Creates the structure of an inhomogeneous Markov model of order
order. |
InhomogeneousMarkov(StringBuffer buf)
The standard constructor for the interface
Storable. |
| Modifier and Type | Method and Description |
|---|---|
InhomogeneousMarkov |
clone() |
String |
getInstanceName()
Returns the name of the
Measure and possibly some additional
information about the current instance. |
int |
getOrder()
Returns the order of the Markov model as defined in the constructor
|
int[][] |
getParents(DataSet fg,
DataSet bg,
double[] weightsFg,
double[] weightsBg,
int length)
Returns the optimal parents for the given data and weights.
|
String |
getXMLTag()
Returns the XML-tag for storing this measure
|
boolean |
isShiftable()
Indicates if
Measure supports shifts. |
fillTensor, fillTensor, getCMI, getCMI, getCurrentParameterSet, getEAR, getEAR, getMatrixForKruskal, getMI, getMI, getStatistics, getStatisticsOrderTwo, reStructure, sum, toParents, toXML, unionpublic InhomogeneousMarkov(int order)
throws SimpleParameter.IllegalValueException,
CloneNotSupportedException
order.order - the orderCloneNotSupportedException - if the parameters could not be clonedSimpleParameter.IllegalValueException - if the order is not allowedpublic InhomogeneousMarkov(InhomogeneousMarkov.InhomogeneousMarkovParameterSet parameters) throws CloneNotSupportedException
parameters - the corresponding parametersCloneNotSupportedException - if the parameters could not be clonedpublic InhomogeneousMarkov(StringBuffer buf) throws NonParsableException
Storable.
Recreates an InhomogeneousMarkov structure from its XML
representation as returned by Measure.toXML().buf - the XML representation as StringBufferNonParsableException - if the XML code could not be parsedpublic int getOrder()
public InhomogeneousMarkov clone() throws CloneNotSupportedException
clone in class MeasureCloneNotSupportedExceptionpublic String getInstanceName()
MeasureMeasure and possibly some additional
information about the current instance.getInstanceName in class MeasureMeasurepublic int[][] getParents(DataSet fg, DataSet bg, double[] weightsFg, double[] weightsBg, int length) throws Exception
Measurep at each position i is build
as follows:
p[i][p.length - 1] contains the index i
itselfp[i][p.length - 2] contains the "most
important" parentp[i][0] contains the "least important" parentgetParents in class Measurefg - the data of the current (foreground) classbg - the data of the negative (background) classweightsFg - the weights for the sequences of fgweightsBg - the weights for the sequences of bglength - the length of the model, must be equal to the length of the
sequencesp with the optimal parentsException - if the lengths do not match or other problems concerning the
data occurpublic boolean isShiftable()
MeasureMeasure supports shifts.isShiftable in class MeasureMeasure supports shifts