lio.probdistributions.bitchain
Class MarginalProducts

java.lang.Object
  extended by lio.probdistributions.bitchain.MarginalProducts
All Implemented Interfaces:
LiOResource, ProbDistribution

public class MarginalProducts
extends java.lang.Object
implements ProbDistribution

This class stores the probabilities as marginal distributions of subsets of variables as it is done in EcGA proposed by George Harik.


Constructor Summary
MarginalProducts()
           
 
Method Summary
 LiOResourceDefinition getDefinition()
          Return a LiOResDescription object with the information of each object.
 int[] getSample()
          Samples some individuals from a probability distribution
 void learn(Individual[] individuals)
          Learns a probability distribution from a set of data
static void main(java.lang.String[] args)
          Main method to test the task.
 void print()
          Prints the last model learnt.
 Individual[] sample(int nIndividuals)
          Samples some individuals from a probability distribution
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarginalProducts

public MarginalProducts()
Method Detail

learn

public void learn(Individual[] individuals)
Learns a probability distribution from a set of data

Specified by:
learn in interface ProbDistribution
Parameters:
individuals - Set of individiduals from which de distribution is estimated.

print

public void print()
Prints the last model learnt.


getSample

public int[] getSample()
Samples some individuals from a probability distribution

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

sample

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

Specified by:
sample in interface ProbDistribution
Parameters:
nIndividuals: - Number of individuals that must be sampled.
Returns:
a population with the sampled individuals.

getDefinition

public LiOResourceDefinition getDefinition()
Return a LiOResDescription object with the information of each object. That object holds the name and all parameters that describe the object

Specified by:
getDefinition in interface LiOResource
Returns:
A definition of the object.

main

public static void main(java.lang.String[] args)
Main method to test the task.