Documentation of 'org.encog.ml.bayesian.query.enumerate.EnumerationQuery' Java class
EnumerationQuery
org.encog.ml.bayesian.query.enumerate

Class EnumerationQuery

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, BayesianQuery


    public class EnumerationQuery
    extends BasicQuery
    implements java.io.Serializable
    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.
    See Also:
    Serialized Form
    • Constructor Detail

      • EnumerationQuery

        public EnumerationQuery(BayesianNetwork theNetwork)
        Construct the enumeration query.
        Parameters:
        theNetwork - The Bayesian network to query.
      • EnumerationQuery

        public EnumerationQuery()
        Default constructor.
    • Method Detail

      • resetEnumeration

        public void resetEnumeration(boolean includeEvidence,
                                     boolean includeOutcome)
        Reset the enumeration events. Always reset the hidden events. Optionally reset the evidence and outcome.
        Parameters:
        includeEvidence - True if the evidence is to be reset.
        includeOutcome - True if the outcome is to be reset.
      • forward

        public boolean forward()
        Roll the enumeration events forward by one.
        Returns:
        False if there are no more values to roll into, which means we're done.
      • execute

        public void execute()
        Execute the query.
        Specified by:
        execute in interface BayesianQuery
      • getProbability

        public double getProbability()
        Specified by:
        getProbability in interface BayesianQuery
        Returns:
        Obtains the probability after execute has been called.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • roll

        public static boolean roll(java.util.List<BayesianEvent> enumerationEvents,
                                   int[] args)
        Roll the enumeration events forward by one.
        Parameters:
        enumerationEvents - The enumeration events.
        args - The arguments.
        Returns:
        False if there are no more values to roll into, which means we're done.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.