Documentation of 'org.encog.ml.bayesian.query.BayesianQuery' Java class
BayesianQuery
org.encog.ml.bayesian.query

Interface BayesianQuery

  • All Superinterfaces:
    java.lang.Cloneable
    All Known Implementing Classes:
    BasicQuery, EnumerationQuery, SamplingQuery


    public interface BayesianQuery
    extends java.lang.Cloneable
    A Bayesian query. This is used to query a Bayesian network and determine a the probability of an output, given some input. The input is called evidence, and the output is the outcome. This results in a final probability of the output being what you specified. You can easily change the events between evidence and outcome, this allows the Bayesian network to be queried in nearly any way. It is also possible to omit missing evidence to handle missing data.
    • Method Detail

      • getNetwork

        BayesianNetwork getNetwork()
        Returns:
        The Bayesian network that we are using this query for.
      • getEvidenceEvents

        java.util.List<BayesianEvent> getEvidenceEvents()
        Returns:
        The evidence events (inputs).
      • getOutcomeEvents

        java.util.List<BayesianEvent> getOutcomeEvents()
        Returns:
        The outcome events (outputs).
      • reset

        void reset()
        Reset all event types back to hidden.
      • defineEventType

        void defineEventType(BayesianEvent event,
                             EventType et)
        Define an event type to be either hidden(default), evidence(input) or outcome (output).
        Parameters:
        event - The event to define.
        et - THe new event type.
      • getEventState

        EventState getEventState(BayesianEvent event)
        Get the event state for a given event.
        Parameters:
        event - The event to get the state for.
        Returns:
        The event state.
      • getEventType

        EventType getEventType(BayesianEvent event)
        Get the event type.
        Parameters:
        event - The event to check.
        Returns:
        The current event type for this event.
      • setEventValue

        void setEventValue(BayesianEvent event,
                           boolean b)
        Set the event value to a boolean.
        Parameters:
        event - The event.
        b - The value.
      • setEventValue

        void setEventValue(BayesianEvent event,
                           int d)
        Set the event value as a class item.
        Parameters:
        event - The event to set.
        d - An integer class item.
      • getProblem

        java.lang.String getProblem()
        Returns:
        Return a string that represents this query as a probability "problem".
      • execute

        void execute()
        Execute the query.
      • getProbability

        double getProbability()
        Returns:
        Obtains the probability after execute has been called.
      • finalizeStructure

        void finalizeStructure()
      • locateEventTypes

        void locateEventTypes()
        Called to locate the evidence and outcome events.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.