com.cra.figaro.algorithm

ProbEvidenceAlgorithm

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
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

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

    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

    Attributes
    protected
  3. abstract def doKill(): Unit

    Attributes
    protected
    Definition Classes
    Algorithm
  4. abstract def doResume(): Unit

    Attributes
    protected
    Definition Classes
    Algorithm
  5. abstract def doStart(): Unit

    Attributes
    protected
    Definition Classes
    Algorithm
  6. abstract def doStop(): Unit

    Attributes
    protected
    Definition Classes
    Algorithm
  7. abstract val universe: Universe

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. var active: Boolean

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

    Definition Classes
    Any
  8. def cleanUp(): Unit

    Removes the evidence provided in the constructor from the universe.

    Removes the evidence provided in the constructor from the universe.

    Definition Classes
    ProbEvidenceAlgorithmAlgorithm
  9. def clone(): AnyRef

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

  11. final def eq(arg0: AnyRef): Boolean

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

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

  14. def finalize(): Unit

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

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

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

    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
  18. def isActive: Boolean

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

    Definition Classes
    Any
  20. def kill(): Unit

    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
  21. def logProbEvidence: Double

    The computed log probability of evidence

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

    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

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

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

  26. def probEvidence: Double

    The computed probability of evidence

  27. def resume(): Unit

    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
  28. def start(): Unit

    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
  29. def stop(): Unit

    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
  30. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  31. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Algorithm

Inherited from AnyRef

Inherited from Any

Ungrouped