|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.jstacs.scoringFunctions.directedGraphicalModels.structureLearning.measures.Measure de.jstacs.scoringFunctions.directedGraphicalModels.structureLearning.measures.InhomogeneousMarkov
public class InhomogeneousMarkov
Class for a network structure of a
BayesianNetworkScoringFunction
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.
Nested Class Summary | |
---|---|
static class |
InhomogeneousMarkov.InhomogeneousMarkovParameterSet
Class for an InstanceParameterSet that defines the parameters of
an InhomogeneousMarkov structure Measure . |
Constructor Summary | |
---|---|
InhomogeneousMarkov(InhomogeneousMarkov.InhomogeneousMarkovParameterSet parameters)
Creates a new InhomogeneousMarkov from the corresponding
InstanceParameterSet 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 . |
Method Summary | |
---|---|
InhomogeneousMarkov |
clone()
|
InstanceParameterSet |
getCurrentParameterSet()
Returns the InstanceParameterSet that has been used to
instantiate the current instance of the implementing class. |
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(Sample fg,
Sample bg,
double[] weightsFg,
double[] weightsBg,
int length)
Returns the optimal parents for the given data and weights. |
boolean |
isShiftable()
Indicates if Measure supports shifts. |
StringBuffer |
toXML()
This method returns an XML representation as StringBuffer of an
instance of the implementing class. |
Methods inherited from class de.jstacs.scoringFunctions.directedGraphicalModels.structureLearning.measures.Measure |
---|
fillTensor, fillTensor, getCMI, getCMI, getEAR, getEAR, getMI, getMI, getStatistics, getStatisticsOrderTwo, sum, toParents, union |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InhomogeneousMarkov(int order)
order
.
order
- the orderpublic InhomogeneousMarkov(InhomogeneousMarkov.InhomogeneousMarkovParameterSet parameters)
InhomogeneousMarkov
from the corresponding
InstanceParameterSet
parameters
.
parameters
- the corresponding parameterspublic InhomogeneousMarkov(StringBuffer buf) throws NonParsableException
Storable
.
Recreates an InhomogeneousMarkov
structure from its XML
representation as returned by toXML()
.
buf
- the XML representation as StringBuffer
NonParsableException
- if the XML code could not be parsedMethod Detail |
---|
public int getOrder()
public InhomogeneousMarkov clone() throws CloneNotSupportedException
clone
in class Measure
CloneNotSupportedException
public String getInstanceName()
Measure
Measure
and possibly some additional
information about the current instance.
getInstanceName
in class Measure
Measure
public int[][] getParents(Sample fg, Sample bg, double[] weightsFg, double[] weightsBg, int length) throws Exception
Measure
p
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" parent
getParents
in class Measure
fg
- the data of the current (foreground) classbg
- the data of the negative (background) classweightsFg
- the weights for the sequences of fg
weightsBg
- the weights for the sequences of bg
length
- the length of the model, must be equal to the length of the
sequences
p
with the optimal parents
Exception
- if the lengths do not match or other problems concerning the
data occurpublic boolean isShiftable()
Measure
Measure
supports shifts.
isShiftable
in class Measure
Measure
supports shiftspublic StringBuffer toXML()
Storable
StringBuffer
of an
instance of the implementing class.
public InstanceParameterSet getCurrentParameterSet() throws Exception
InstantiableFromParameterSet
InstanceParameterSet
that has been used to
instantiate the current instance of the implementing class. If the
current instance was not created using an InstanceParameterSet
,
an equivalent InstanceParameterSet
should be returned, so that an
instance created using this InstanceParameterSet
would be in
principle equal to the current instance.
InstanceParameterSet
Exception
- if the InstanceParameterSet
could not be returned
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |