Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VariableEliminationInference

An exact inference algorithm for Bayesian networks and Dynamic Bayesian networks, loosely based on the Variable Elimination algorithm.

see

com.bayesserver.inference.relevancetree.RelevanceTreeInference

see

com.bayesserver.inference.IInference

Hierarchy

  • VariableEliminationInference

Implements

Index

Constructors

constructor

  • Initializes a new instance of the {@link com.bayesserver.inference.variableelimination.VariableEliminationInference} class, with the target Bayesian network.

    exception

    ReferenceError Raised if [network] is null.

    Parameters

    • network: Network

      The target {@link com.bayesserver.Network}.

    Returns VariableEliminationInference

Accessors

baseEvidence

  • inheritdoc

    Returns IEvidence

  • inheritdoc

    Parameters

    Returns void

evidence

  • Gets the evidence (case data, e.g. row in a database) used in a {@link com.bayesserver.inference.IInference#query query}.

    The {@link com.bayesserver.inference.IInference#getQueryDistributions distributions} are only recalculated when {@link com.bayesserver.inference.IInference#query} is called, not each time evidence is changed.

    Returns IEvidence

  • Sets the evidence (case data, e.g. row in a database) used in a {@link com.bayesserver.inference.IInference#query query}.

    The {@link com.bayesserver.inference.IInference#getQueryDistributions distributions} are only recalculated when {@link com.bayesserver.inference.IInference#query} is called, not each time evidence is changed.

    Parameters

    Returns void

network

  • inheritdoc

    Returns Network

queryDistributions

  • The collection of distributions required from a {@link com.bayesserver.inference.IInference#query}. Only request those that you need.

    Each distribution added, such as a {@link com.bayesserver.Table}, acts like a buffer. I.e. the values are populated by the {@link com.bayesserver.inference.IInference#query} method. This means that the same distributions can be resused across multiple calls to {@link com.bayesserver.inference.IInference#query}, without the need to recreate the distribution each time.

    It is important not to request distributions you do not need, because the computations will take longer. For example, it is common to request all marginal probabilities, P(A), P(B), P(C), ... , P(Z) given the {@link com.bayesserver.inference.IEvidence evidence}, however if you only need to know P(A) and P(B) given the {@link com.bayesserver.inference.IEvidence evidence}, then limit the query to just these distributions.

    Typically the distributions requested are a number of marginal propabilities, such as P(A), P(B), P(C) etc... given the {@link com.bayesserver.inference.IEvidence evidence}, however it is also possible to request distributions over more than one variable, so we might query P(A), P(B,C) given the {@link com.bayesserver.inference.IEvidence evidence}.

    If you are performing a batch of queries, there is no need to remove those distributions that you require, however happen to have evidence set for a particular query.

    Returns IQueryDistributionCollection

  • The collection of distributions required from a {@link com.bayesserver.inference.IInference#query}. Only request those that you need.

    Each distribution added, such as a {@link com.bayesserver.Table}, acts like a buffer. I.e. the values are populated by the {@link com.bayesserver.inference.IInference#query} method. This means that the same distributions can be resused across multiple calls to {@link com.bayesserver.inference.IInference#query}, without the need to recreate the distribution each time.

    It is important not to request distributions you do not need, because the computations will take longer. For example, it is common to request all marginal probabilities, P(A), P(B), P(C), ... , P(Z) given the {@link com.bayesserver.inference.IEvidence evidence}, however if you only need to know P(A) and P(B) given the {@link com.bayesserver.inference.IEvidence evidence}, then limit the query to just these distributions.

    Typically the distributions requested are a number of marginal propabilities, such as P(A), P(B), P(C) etc... given the {@link com.bayesserver.inference.IEvidence evidence}, however it is also possible to request distributions over more than one variable, so we might query P(A), P(B,C) given the {@link com.bayesserver.inference.IEvidence evidence}.

    If you are performing a batch of queries, there is no need to remove those distributions that you require, however happen to have evidence set for a particular query.

    Parameters

    Returns void

Methods

_uuu_x_

  • _uuu_x_(): void
  • Returns void

_uuv_x_

  • _uuv_x_(): void
  • Returns void

query