|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.ml.bayesian.query.BasicQuery
org.encog.ml.bayesian.query.enumerate.EnumerationQuery
public class EnumerationQuery
An enumeration query allows probabilistic queries on a Bayesian network. Enumeration works by calculating every combination of hidden nodes and using total probability. This results in an accurate deterministic probability. However, enumeration can be slow for large Bayesian networks. For a quick estimate of probability the sampling query can be used.
Constructor Summary | |
---|---|
EnumerationQuery()
Default constructor. |
|
EnumerationQuery(BayesianNetwork theNetwork)
Construct the enumeration query. |
Method Summary | |
---|---|
EnumerationQuery |
clone()
|
void |
execute()
Execute the query. |
boolean |
forward()
Roll the enumeration events forward by one. |
double |
getProbability()
|
void |
resetEnumeration(boolean includeEvidence,
boolean includeOutcome)
Reset the enumeration events. |
static boolean |
roll(List<BayesianEvent> enumerationEvents,
int[] args)
Roll the enumeration events forward by one. |
String |
toString()
|
Methods inherited from class org.encog.ml.bayesian.query.BasicQuery |
---|
defineEventType, finalizeStructure, getEvents, getEventState, getEventType, getEvidenceEvents, getNetwork, getOutcomeEvents, getProblem, isNeededEvidence, locateEventTypes, reset, satisfiesDesiredOutcome, setEventValue, setEventValue |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EnumerationQuery(BayesianNetwork theNetwork)
theNetwork
- The Bayesian network to query.public EnumerationQuery()
Method Detail |
---|
public void resetEnumeration(boolean includeEvidence, boolean includeOutcome)
includeEvidence
- True if the evidence is to be reset.includeOutcome
- True if the outcome is to be reset.public boolean forward()
public void execute()
execute
in interface BayesianQuery
public double getProbability()
getProbability
in interface BayesianQuery
public String toString()
toString
in class Object
public static boolean roll(List<BayesianEvent> enumerationEvents, int[] args)
public EnumerationQuery clone()
clone
in interface BayesianQuery
clone
in class BasicQuery
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |