unbbayes.simulation.likelihoodweighting.sampling
Class LikelihoodWeightingSampling
java.lang.Object
unbbayes.simulation.montecarlo.sampling.AMonteCarloSampling
unbbayes.simulation.montecarlo.sampling.MatrixMonteCarloSampling
unbbayes.simulation.likelihoodweighting.sampling.LikelihoodWeightingSampling
- All Implemented Interfaces:
- ILikelihoodWeightingSampling, IMonteCarloSampling, ILongTaskProgressObservable
public class LikelihoodWeightingSampling
- extends MatrixMonteCarloSampling
- implements ILikelihoodWeightingSampling
Likelihood Weighting sampling based on MC sampling. However, it does not
sample for the evidence nodes, it just sets as the given state, and it
calculates P(E|Par(E)) for each trial.
- Author:
- Rommel Carvalho (rommel.carvalho@gmail.com)
| Methods inherited from class unbbayes.simulation.montecarlo.sampling.AMonteCarloSampling |
addToSamplingOrderQueue, computeFactors, createSamplingOrderQueue, getCumulativeDistributionFunction, getCurrentProgress, getCurrentProgressStatus, getIndexInQueue, getLinearCoord, getMaxProgress, getMultidimensionalCoord, getParentsIndexesInQueue, getPercentageDone, getProbabilityMassFunction, getSamplingNodeOrderQueue, getState, initSamplingOrderQueue, notityObservers, registerObserver, removeObserver, updateProgress, updateProgress |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
evidenceNodeList
protected List<Node> evidenceNodeList
probabilityEvidenceGivenParentList
protected float[] probabilityEvidenceGivenParentList
LikelihoodWeightingSampling
public LikelihoodWeightingSampling()
getFullStatesSetWeight
public float[] getFullStatesSetWeight()
- Return P(E|Par(E)) = ProductOf[P(Ei|Par(Ei))] for all evidences (findings).
There is one probability associated with each trial.
- Specified by:
getFullStatesSetWeight in interface ILikelihoodWeightingSampling
- Returns:
- P(E|Par(E)) for each trial.
start
public void start(ProbabilisticNetwork pn,
int nTrials)
- Description copied from class:
MatrixMonteCarloSampling
- Generates the MC sample with the given size for the given probabilistic network.
- Specified by:
start in interface IMonteCarloSampling- Overrides:
start in class MatrixMonteCarloSampling
- Parameters:
pn - Probabilistic network that will be used for sampling.nTrials - Number of trials to generate.
simulate
protected void simulate(int nTrial)
- Description copied from class:
MatrixMonteCarloSampling
- Responsible for simulating MC for sampling.
- Overrides:
simulate in class MatrixMonteCarloSampling
- Parameters:
nTrial - The trial number to simulate.
getCompactStatesSetWeight
public float[] getCompactStatesSetWeight()
- Not implemented.
- Specified by:
getCompactStatesSetWeight in interface ILikelihoodWeightingSampling
- Returns:
- null.
getMapStatesSetWeight
public Map<Integer,Float> getMapStatesSetWeight()
- Not implemented.
- Specified by:
getMapStatesSetWeight in interface ILikelihoodWeightingSampling
- Returns:
- null.
Copyright © 2001-2010 University of Brasilia - UnB. All Rights Reserved.