|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.scoringFunctions.directedGraphicalModels.structureLearning.measures.Measure
de.jstacs.scoringFunctions.directedGraphicalModels.structureLearning.measures.btMeasures.BTMutualInformation
public class BTMutualInformation
Structure learning Measure that computes a maximum spanning tree
based on mutual information and uses the resulting tree structure as
structure of a Bayesian tree (special case of a Bayesian network) in a
BayesianNetworkScoringFunction
.
| Nested Class Summary | |
|---|---|
static class |
BTMutualInformation.BTMutualInformationParameterSet
Class for the parameters of a BTMutualInformation structure
Measure. |
static class |
BTMutualInformation.DataSource
Enum defining the possible sources of data to compute the mutual
information. |
| Constructor Summary | |
|---|---|
BTMutualInformation(BTMutualInformation.BTMutualInformationParameterSet parameters)
Creates a new BTMutualInformation from the corresponding
InstanceParameterSet parameters. |
|
BTMutualInformation(BTMutualInformation.DataSource clazz,
double[] ess)
Creates a new mutual information Bayesian tree Measure. |
|
BTMutualInformation(StringBuffer buf)
The standard constructor for the interface Storable. |
|
| Method Summary | |
|---|---|
BTMutualInformation |
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[][] |
getParents(Sample fg,
Sample bg,
double[] weightsFg,
double[] weightsBg,
int length)
Returns the optimal parents for the given data and weights. |
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, isShiftable, sum, toParents, union |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BTMutualInformation(StringBuffer buf)
throws NonParsableException
Storable.
Recreates a BTMutualInformation from is XML representation as
returned by toXML().
buf - the XML representation as StringBuffer
NonParsableException - if the XML code could not be parsed
public BTMutualInformation(BTMutualInformation.DataSource clazz,
double[] ess)
Measure.
clazz - the classes used for computation of mutual information, as
defined by BTMutualInformation.DataSourceess - the equivalent sample sizes for both classespublic BTMutualInformation(BTMutualInformation.BTMutualInformationParameterSet parameters)
BTMutualInformation from the corresponding
InstanceParameterSet parameters.
parameters - the corresponding parameters| Method Detail |
|---|
public BTMutualInformation clone()
throws CloneNotSupportedException
clone in class MeasureCloneNotSupportedExceptionpublic String getInstanceName()
MeasureMeasure and possibly some additional
information about the current instance.
getInstanceName in class MeasureMeasure
public int[][] getParents(Sample fg,
Sample 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" parent
getParents 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
sequences
p with the optimal parents
Exception - if the lengths do not match or other problems concerning the
data occurpublic StringBuffer toXML()
StorableStringBuffer of an
instance of the implementing class.
public InstanceParameterSet getCurrentParameterSet()
throws Exception
InstantiableFromParameterSetInstanceParameterSet 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 | |||||||||