lio.population.bitchain
Class SetAnalysis

java.lang.Object
  extended by lio.population.bitchain.SetAnalysis

public class SetAnalysis
extends java.lang.Object

This class provides statistical information from a set of BitChain individuals. In order to do that, it extracts the references to the elements inside each one and works with the arrays of integer, allowing the access to each position independently.


Constructor Summary
SetAnalysis(Individual[] individuals)
          Constructor Builds a set analizer by extracting the references to the elements inside each BitChain in the array passed as parameter.
SetAnalysis(Individual[] individuals, int pNumIndividuals)
          Constructor Builds a set analizer by extracting the references to the elements inside each BitChain in the array as parameter.
SetAnalysis(int[][] samples)
           
SetAnalysis(Population pop)
          Constructor Builds a set analizer by extracting the references to the elements inside each BitChain in the populaton passed as parameter.
SetAnalysis(Population pop, int pNumIndividuals)
          Constructor Builds a set analizer by extracting the references to the elements inside each BitChain in the populaton passed as parameter.
 
Method Summary
 double getCondEntropy(int X, int Y)
          Computes conditional entropy for X given Y
 double getCondEntropy(int X, int[] listY)
          Computes conditional entropy for X given Y
 double getCondMutualInformation(int X, int[] listY, int[] listZ)
          Computes conditional mutual information value for X and listY given listZ
 int getCount(int[] vars, int[] values)
           
 int getCount(int varX, int varY, int valX, int valY)
           
 double getEntropy(int X)
          Computes entropy for X
 double getEntropy(int[] vars)
           
 double getEntropyB2(int[] vars)
           
 int getIndSize()
          Getter for property indSize.
 double[] getMarginalFrequencies()
           
 double getMutualInformation(int X, int Y)
          Computes mutual information value for X and listY
 double getMutualInformation(int X, int[] listY)
          Computes mutual information value for X and listY
 int getSize()
          Getter for property size.
static void main(java.lang.String[] args)
           
 void setIndSize(int indSize)
          Setter for property indSize.
 void setSize(int size)
          Setter for property size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetAnalysis

public SetAnalysis(Individual[] individuals)
Constructor Builds a set analizer by extracting the references to the elements inside each BitChain in the array passed as parameter.

Parameters:
individuals - Array of individuals that will be processed.

SetAnalysis

public SetAnalysis(Individual[] individuals,
                   int pNumIndividuals)
Constructor Builds a set analizer by extracting the references to the elements inside each BitChain in the array as parameter. It only works with the best individuals.

Parameters:
individuals - Array of individuals that will be processed.
numIndividuals - number of selected;

SetAnalysis

public SetAnalysis(Population pop)
Constructor Builds a set analizer by extracting the references to the elements inside each BitChain in the populaton passed as parameter.

Parameters:
pop - Population that will be processed.

SetAnalysis

public SetAnalysis(Population pop,
                   int pNumIndividuals)
Constructor Builds a set analizer by extracting the references to the elements inside each BitChain in the populaton passed as parameter. It only works with the best individuals.

Parameters:
pop - Population that will be processed.
numIndividuals - number of individuals that will be encapsulated.

SetAnalysis

public SetAnalysis(int[][] samples)
Method Detail

getEntropy

public double getEntropy(int X)
Computes entropy for X

Parameters:
X - varialbes's position in the individual
Returns:

getEntropy

public double getEntropy(int[] vars)

getEntropyB2

public double getEntropyB2(int[] vars)

getCondEntropy

public double getCondEntropy(int X,
                             int Y)
Computes conditional entropy for X given Y

Parameters:
X - variable's position in the individual
Y - variable's position in the individual
Returns:

getCondEntropy

public double getCondEntropy(int X,
                             int[] listY)
Computes conditional entropy for X given Y

Parameters:
X - variable's position in the individual
listY - variables' position in the individual
Returns:

getCount

public int getCount(int[] vars,
                    int[] values)
Parameters:
vars - position for the required variables
values - values for this variables
Returns:
number of individual which have this values in this positions (variables)

getCount

public int getCount(int varX,
                    int varY,
                    int valX,
                    int valY)
Parameters:
varX - position for variable X
varY - position for variable Y
valX - variable X value
valY - variable Y value
Returns:
number of individual which have this values in this positions (variables)

getMarginalFrequencies

public double[] getMarginalFrequencies()

getMutualInformation

public double getMutualInformation(int X,
                                   int[] listY)
Computes mutual information value for X and listY

Parameters:
X - variable's position in the individual
listY - variables' position in the individual
Returns:
mutual information for X given listY variables

getMutualInformation

public double getMutualInformation(int X,
                                   int Y)
Computes mutual information value for X and listY

Parameters:
X - variable's position in the individual
Y - variable's position in the individual
Returns:

getCondMutualInformation

public double getCondMutualInformation(int X,
                                       int[] listY,
                                       int[] listZ)
Computes conditional mutual information value for X and listY given listZ

Parameters:
X - variable's position in the individual
listY - variables' position in the individual
listZ - conditioning variables' position in the individual
Returns:

main

public static void main(java.lang.String[] args)

getSize

public int getSize()
Getter for property size.

Returns:
Value of property size.

setSize

public void setSize(int size)
Setter for property size.

Parameters:
size - New value of property size.

getIndSize

public int getIndSize()
Getter for property indSize.

Returns:
Value of property indSize.

setIndSize

public void setIndSize(int indSize)
Setter for property indSize.

Parameters:
indSize - New value of property indSize.