public class BTMutualInformation extends Measure
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
BayesianNetworkDiffSM
.| Modifier and Type | Class and Description |
|---|---|
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. |
Measure.MeasureParameterSetparameters| Constructor and Description |
|---|
BTMutualInformation(BTMutualInformation.BTMutualInformationParameterSet 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. |
| Modifier and Type | Method and Description |
|---|---|
String |
getInstanceName()
Returns the name of the
Measure and possibly some additional
information about the current instance. |
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
|
clone, fillTensor, fillTensor, getCMI, getCMI, getCurrentParameterSet, getEAR, getEAR, getMatrixForKruskal, getMI, getMI, getStatistics, getStatisticsOrderTwo, isShiftable, reStructure, sum, toParents, toXML, unionpublic BTMutualInformation(StringBuffer buf) throws NonParsableException
Storable.
Recreates a BTMutualInformation from is XML representation as
returned by Measure.toXML().buf - the XML representation as StringBufferNonParsableException - if the XML code could not be parsedpublic BTMutualInformation(BTMutualInformation.DataSource clazz, double[] ess) throws CloneNotSupportedException, Exception
Measure.clazz - the classes used for computation of mutual information, as
defined by BTMutualInformation.DataSourceess - the equivalent sample sizes for both classesCloneNotSupportedException - if the parameters could not be createdException - if the parameters could not be created for the esspublic BTMutualInformation(BTMutualInformation.BTMutualInformationParameterSet parameters) throws CloneNotSupportedException
parameters - the corresponding parametersCloneNotSupportedException - if the parameters could not be clonedpublic 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 occur