Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.jstacs.scoringFunctions.directedGraphicalModels.structureLearning.measures.pmmMeasures
Class PMMMutualInformation

    java.lang.Object
      de.jstacs.scoringFunctions.directedGraphicalModels.structureLearning.measures.Measure
          de.jstacs.scoringFunctions.directedGraphicalModels.structureLearning.measures.pmmMeasures.PMMMutualInformation

All Implemented Interfaces:
  Storable, Cloneable

    public class PMMMutualInformation

extends Measure

Class for the network structure of a `BayesianNetworkScoringFunction` that is a permuted Markov model based on mutual information.

Author:
  Jan Grau

Field Summary
`static int` | `BG` Compute mutual information only from background data
`static int` | `BOTH` Use both data sets to compute the mutual information
`static int` | `FG` Compute mutual information only from foreground data

Constructor Summary
`PMMMutualInformation(byte order, int clazz, double[] ess)` Creates a new `PMMMutualInformation` of order `order`.
`PMMMutualInformation(StringBuffer buf)` Re-creates a `PMMMutualInformation` from its XML-representation as returned by `toXML()`.

Method Summary
`PMMMutualInformation` | `clone()`
`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 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`

Field Detail

### FG

    public static final int FG

  Compute mutual information only from foreground data

  See Also:
    Constant Field Values

### BG

    public static final int BG

  Compute mutual information only from background data

  See Also:
    Constant Field Values

### BOTH

    public static final int BOTH

  Use both data sets to compute the mutual information

  See Also:
    Constant Field Values

Constructor Detail

### PMMMutualInformation

    public PMMMutualInformation(byte order,
                                int clazz,
                                double[] ess)
                         throws Exception

  Creates a new `PMMMutualInformation` of order `order`.

  Parameters:
    `order` - the order, may be `1` or `2`.
    `clazz` - the classes used for computation of mutual information, one of `BTMutualInformation.FG`, `BTMutualInformation.BG`, `BTMutualInformation.BOTH`
    `ess` - the equivalent sample size for both classes
  Throws:
    `Exception`

### PMMMutualInformation

    public PMMMutualInformation(StringBuffer buf)
                         throws NonParsableException

  Re-creates a `PMMMutualInformation` from its XML-representation as returned by `toXML()`.

  Parameters:
    `buf` - the XML-representation
  Throws:
    `NonParsableException` - is thrown if the XML-code could not be parsed

Method Detail

### clone

    public PMMMutualInformation clone()
                               throws CloneNotSupportedException

  Overrides:
    `clone` in class `Measure`
  Throws:
    `CloneNotSupportedException`

### getInstanceName

    public String getInstanceName()

  Description copied from class: `Measure`
  Returns the name of the `Measure` and possibly some additional information about the current instance.

  Specified by:
    `getInstanceName` in class `Measure`
  Returns:
    the name

### getParents

    public int[][] getParents(Sample fg,
                              Sample bg,
                              double[] weightsFg,
                              double[] weightsBg,
                              int length)
                       throws Exception

  Description copied from class: `Measure`
  Returns the optimal parents for the given data and weights. The array of parents `p` at each position `i` is build as follows:
  - `p[i][p.length - 1]` contains the index `i` itself
  - `p[i][p.length - 2]` contains the "most important" parent
  - ...
  - `p[i][0]` contains the "least important parent

  Specified by:
    `getParents` in class `Measure`
  Parameters:
    `fg` - the data of the current (foreground) class
    `bg` - the data of the negative (background) class
    `weightsFg` - 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
  Returns:
    the parents
  Throws:
    `Exception` - thrown if the lengths do not match or other problems concerning the data occur

### toXML

    public StringBuffer toXML()

  Description copied from interface: `Storable`
  This method returns an XML-representation of an instance of the implementing class.

  Returns:
    the XML-representation

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD