Classes | |
class | SampledAssignment |
Public Member Functions | |
SampledDistribution | _infer () throws Exception |
WeightedSample | getWeightedSample (WeightedSample s, int[] nodeOrder, int[] evidenceDomainIndices) throws Exception |
SampleSearch (BeliefNetworkEx bn) throws Exception | |
Protected Member Functions | |
int[] | computeNodeOrdering () throws Exception |
void | info (int step) |
SampledAssignment | sampleForward (BeliefNode node, int[] nodeDomainIndices, boolean[] excluded) |
Protected Attributes | |
int | currentStep |
int[] | nodeOrder |
simple implementation of the SampleSearch algorithm by Gogate & Dechter. NOTE: This implementation does not properly weight samples
Definition at line 15 of file SampleSearch.java.
edu::tum::cs::bayesnets::inference::SampleSearch::SampleSearch | ( | BeliefNetworkEx | bn | ) | throws Exception [inline] |
Definition at line 19 of file SampleSearch.java.
SampledDistribution edu::tum::cs::bayesnets::inference::SampleSearch::_infer | ( | ) | throws Exception [inline, virtual] |
Implements edu::tum::cs::bayesnets::inference::Sampler.
Definition at line 33 of file SampleSearch.java.
int [] edu::tum::cs::bayesnets::inference::SampleSearch::computeNodeOrdering | ( | ) | throws Exception [inline, protected] |
Definition at line 25 of file SampleSearch.java.
WeightedSample edu::tum::cs::bayesnets::inference::SampleSearch::getWeightedSample | ( | WeightedSample | s, | |
int[] | nodeOrder, | |||
int[] | evidenceDomainIndices | |||
) | throws Exception [inline] |
Definition at line 74 of file SampleSearch.java.
void edu::tum::cs::bayesnets::inference::SampleSearch::info | ( | int | step | ) | [inline, protected] |
Definition at line 29 of file SampleSearch.java.
SampledAssignment edu::tum::cs::bayesnets::inference::SampleSearch::sampleForward | ( | BeliefNode | node, | |
int[] | nodeDomainIndices, | |||
boolean[] | excluded | |||
) | [inline, protected] |
samples forward, i.e. samples a value for 'node' given its parents
node | the node for which to sample a value | |
nodeDomainIndices | array of domain indices for all nodes in the network; the values for the parents of 'node' must be set already |
Definition at line 168 of file SampleSearch.java.
int edu::tum::cs::bayesnets::inference::SampleSearch::currentStep [protected] |
Definition at line 17 of file SampleSearch.java.
int [] edu::tum::cs::bayesnets::inference::SampleSearch::nodeOrder [protected] |
Definition at line 16 of file SampleSearch.java.