lio.probdistributions.bitchain
Class BivariateProbDistribution

java.lang.Object
  extended by lio.probdistributions.bitchain.BinaryProbDistribution
      extended by lio.probdistributions.bitchain.BivariateProbDistribution
All Implemented Interfaces:
LiOResource, ProbDistribution
Direct Known Subclasses:
Chain, Tree

public abstract class BivariateProbDistribution
extends BinaryProbDistribution

This class implements the common features and data structures of bivariate probability distributions. They are separated from bayesian and dependency networks for efficiency. Position of the arrays follows a topological order. The learning method will determine the instantiation of this class.


Field Summary
protected  double[][] conditionals
          Conditional probabilities of each variable.
protected  double[] marginals
          Vector that contains the marginal probabilities
protected  int[] parents
          Variable parent of the one represented by each position.
protected  int[] variables
          Contains the variable represented by each position.
 
Fields inherited from class lio.probdistributions.bitchain.BinaryProbDistribution
data, laplace, size
 
Constructor Summary
BivariateProbDistribution()
           
 
Method Summary
protected  void createStructures(int pSize)
          Creates the necessary structures for the search.
 Individual[] sample(int nIndividuals)
          Samples some individuals from a probability distribution
 
Methods inherited from class lio.probdistributions.bitchain.BinaryProbDistribution
isLaplace, setLaplace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface lio.probdistributions.ProbDistribution
learn
 
Methods inherited from interface lio.core.LiOResource
getDefinition
 

Field Detail

variables

protected int[] variables
Contains the variable represented by each position.


parents

protected int[] parents
Variable parent of the one represented by each position.


conditionals

protected double[][] conditionals
Conditional probabilities of each variable.


marginals

protected double[] marginals
Vector that contains the marginal probabilities

Constructor Detail

BivariateProbDistribution

public BivariateProbDistribution()
Method Detail

createStructures

protected void createStructures(int pSize)
Creates the necessary structures for the search.

Parameters:
pSize - Size of the individuals from which the model will be learnt.

sample

public Individual[] sample(int nIndividuals)
Samples some individuals from a probability distribution

Parameters:
nIndividuals - Number of individuals that must be sampled.
Returns:
The selected individuals.