Trait

com.cra.figaro.algorithm

ProbEvidenceAlgorithm

Related Doc: package algorithm

Permalink

trait ProbEvidenceAlgorithm extends Algorithm

Algorithms that compute probability of evidence. The evidence is specified as a list of named Evidence items. In addition to the universe, the ProbEvidenceAlgorithm takes two optional arguments. The evidence, which defaults to empty, and the denominator, which defaults to 1. The evidence is a list of specific evidence items associated with references. When started, the algorithm computes the probability of the named evidence, in addition to the conditions and constraints in the model, divided by the denominator (partition function). In a typical use case, one might want to compute the probability of the named evidence, taking the conditions and constraints as a given part of the model. To achieve this, you would create a ProbEvidenceAlgorithm with no evidence to compute the probability of the conditions and constraints. This probability becomes the denominator in a subsequent algorithm that takes the named evidence whose probability you want to compute. Several shortcut ways of achieving this are provided.

Linear Supertypes
Algorithm, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ProbEvidenceAlgorithm
  2. Algorithm
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def additionalEvidenceAlgorithm(evidence: List[NamedEvidence[_]]): ProbEvidenceAlgorithm

    Permalink

    The algorithm used to compute the probability of additional evidence, as created by probAdditionalEvidence.

    The algorithm used to compute the probability of additional evidence, as created by probAdditionalEvidence. This algorithm can be different to the one defined in this class. (For example, a one-time algorithm can use an anytime algorithm for additional evidence.)

  2. abstract def computedResult: Double

    Permalink
    Attributes
    protected
  3. abstract def doKill(): Unit

    Permalink
    Attributes
    protected[com.cra.figaro.algorithm]
    Definition Classes
    Algorithm
  4. abstract def doResume(): Unit

    Permalink
    Attributes
    protected[com.cra.figaro.algorithm]
    Definition Classes
    Algorithm
  5. abstract def doStart(): Unit

    Permalink
    Attributes
    protected[com.cra.figaro.algorithm]
    Definition Classes
    Algorithm
  6. abstract def doStop(): Unit

    Permalink
    Attributes
    protected[com.cra.figaro.algorithm]
    Definition Classes
    Algorithm
  7. abstract val universe: Universe

    Permalink

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. var active: Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Algorithm
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def cleanUp(): Unit

    Permalink

    Removes the evidence provided in the constructor from the universe.

    Removes the evidence provided in the constructor from the universe.

    Definition Classes
    ProbEvidenceAlgorithmAlgorithm
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. val denominator: Double

    Permalink
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. val evidence: List[NamedEvidence[_]]

    Permalink
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  15. def initialize(): Unit

    Permalink

    Since probability of evidence algorithms introduce additional evidence (namely, their evidence argument), into an existing universe, a mechanism must be provided for introducing the evidence when the algorithm begins and cleaning it up at the end.

    Since probability of evidence algorithms introduce additional evidence (namely, their evidence argument), into an existing universe, a mechanism must be provided for introducing the evidence when the algorithm begins and cleaning it up at the end. This is achieved with the initialize method, called when the algorithm starts, and the cleanUp method, called when the algorithm is killed.

    Definition Classes
    ProbEvidenceAlgorithmAlgorithm
  16. def isActive: Boolean

    Permalink
    Definition Classes
    Algorithm
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def kill(): Unit

    Permalink

    Kill the algorithm so that it is inactive.

    Kill the algorithm so that it is inactive. It will no longer be able to provide answers.Throws AlgorithmInactiveException if the algorithm is not active.

    Definition Classes
    Algorithm
  19. def logProbEvidence: Double

    Permalink

    The computed log probability of evidence.

  20. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. def probAdditionalEvidence(evidence: List[NamedEvidence[_]]): ProbEvidenceAlgorithm

    Permalink

    Returns an algorithm to compute the probability of the additional evidence provided.

  24. def probEvidence: Double

    Permalink

    The computed probability of evidence.

  25. def resume(): Unit

    Permalink

    Resume the computation of the algorithm, if it has been stopped.

    Resume the computation of the algorithm, if it has been stopped. Throws AlgorithmInactiveException if the algorithm is not active.

    Definition Classes
    Algorithm
  26. def start(): Unit

    Permalink

    Start the algorithm and make it active.

    Start the algorithm and make it active. After it returns, the algorithm must be ready to provide answers. Throws AlgorithmActiveException if the algorithm is already active.

    Definition Classes
    Algorithm
  27. def stop(): Unit

    Permalink

    Stop the algorithm from computing.

    Stop the algorithm from computing. The algorithm is still ready to provide answers after it returns. Throws AlgorithmInactiveException if the algorithm is not active.

    Definition Classes
    Algorithm
  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  29. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Algorithm

Inherited from AnyRef

Inherited from Any

Ungrouped