Trait

com.cra.figaro.algorithm

OneTimeBoundsProbQuery

Related Doc: package algorithm

Permalink

trait OneTimeBoundsProbQuery extends BoundsProbQueryAlgorithm with OneTimeProbQuery

One-time algorithms that compute bounds on conditional probabilities of query elements. A class that implements this trait must implement run, computeAllProbabilityBounds, and computeExpectationBounds methods.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. OneTimeBoundsProbQuery
  2. OneTimeProbQuery
  3. OneTime
  4. BoundsProbQueryAlgorithm
  5. ProbQueryAlgorithm
  6. BaseProbQueryAlgorithm
  7. Algorithm
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class NotATargetException[T] extends AlgorithmException

    Permalink
    Definition Classes
    BaseProbQueryAlgorithm

Abstract Value Members

  1. abstract def computeAllProbabilityBounds[T](target: Element[T]): Stream[(Double, Double, T)]

    Permalink

    Return an estimate of the marginal probability distribution over the target that lists each value with its probability bounds.

    Return an estimate of the marginal probability distribution over the target that lists each value with its probability bounds. Each entry is a triple (lower, upper, value). The result is a lazy stream. It is up to the algorithm how the stream is ordered.

    Definition Classes
    BoundsProbQueryAlgorithm
  2. abstract def computeDistribution[T](target: Element[T]): Stream[(Double, T)]

    Permalink

    Return an estimate of the marginal probability distribution over the target that lists each element with its probability.

    Return an estimate of the marginal probability distribution over the target that lists each element with its probability. The result is a lazy stream. It is up to the algorithm how the stream is ordered.

    Definition Classes
    BaseProbQueryAlgorithm
  3. abstract def computeExpectation[T](target: Element[T], function: (T) ⇒ Double): Double

    Permalink

    Return an estimate of the expectation of the function under the marginal probability distribution of the target.

    Return an estimate of the expectation of the function under the marginal probability distribution of the target.

    Definition Classes
    BaseProbQueryAlgorithm
  4. abstract def computeExpectationBounds[T](target: Element[T], function: (T) ⇒ Double, bounds: Option[(Double, Double)]): (Double, Double)

    Permalink

    Return an estimate of the bounds on the expectation of the function under the marginal probability distribution of the target.

    Return an estimate of the bounds on the expectation of the function under the marginal probability distribution of the target. The function is assumed to be bounded between the specified lower and upper bounds, if provided. Otherwise, the lower and upper bounds of the function using the current known values of the target are used.

    Definition Classes
    BoundsProbQueryAlgorithm
  5. abstract val queryTargets: Seq[Element[_]]

    Permalink
    Definition Classes
    BaseProbQueryAlgorithm
  6. abstract def run(): Unit

    Permalink

    Run the algorithm, performing its computation to completion.

    Run the algorithm, performing its computation to completion.

    Definition Classes
    OneTime
  7. abstract val universe: Universe

    Permalink
    Definition Classes
    ProbQueryAlgorithm

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. def allProbabilityBounds[T](target: Element[T]): Stream[(Double, Double, T)]

    Permalink

    Return an estimate of the marginal probability distribution over the target that lists each value with its probability bounds.

    Return an estimate of the marginal probability distribution over the target that lists each value with its probability bounds. Each entry is a triple (lower, upper, value). The result is a lazy stream. It is up to the algorithm how the stream is ordered.

    target

    Element for which to compute bounds.

    returns

    Bounds on the probability of each value for this element.

    Definition Classes
    BoundsProbQueryAlgorithm
    Exceptions thrown

    AlgorithmInactiveException if the algorithm is inactive.

    NotATargetException if called on a target that is not in the list of targets of the algorithm.

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def check[T](target: Element[T]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    BaseProbQueryAlgorithm
  8. def cleanUp(): Unit

    Permalink

    Called when the algorithm is killed.

    Called when the algorithm is killed. By default, does nothing. Can be overridden.

    Definition Classes
    Algorithm
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def computeProbability[T](target: Element[T], predicate: (T) ⇒ Boolean): Double

    Permalink

    Return an estimate of the probability of the predicate under the marginal probability distribution of the target.

    Return an estimate of the probability of the predicate under the marginal probability distribution of the target.

    Definition Classes
    BaseProbQueryAlgorithm
  11. def computeProbabilityBounds[T](target: Element[T], predicate: (T) ⇒ Boolean): (Double, Double)

    Permalink

    Return an estimate of the probability of the bounds on the predicate under the marginal probability distribution of the target.

    Return an estimate of the probability of the bounds on the predicate under the marginal probability distribution of the target.

    Definition Classes
    BoundsProbQueryAlgorithm
  12. def computeProjection[T](target: Element[T]): List[(T, Double)]

    Permalink
    Attributes
    protected[com.cra.figaro.algorithm]
    Definition Classes
    BaseProbQueryAlgorithm
  13. def distribution[T](target: Element[T]): Stream[(Double, T)]

    Permalink

    Return an estimate of the marginal probability distribution over the target that lists each element with its probability.

    Return an estimate of the marginal probability distribution over the target that lists each element with its probability. The result is a lazy stream. It is up to the algorithm how the stream is ordered. Throws NotATargetException if called on a target that is not in the list of targets of the algorithm. Throws AlgorithmInactiveException if the algorithm is inactive.

    Definition Classes
    BaseProbQueryAlgorithm
  14. def doAllProbabilityBounds[T](target: Element[T]): Stream[(Double, Double, T)]

    Permalink
    Attributes
    protected
    Definition Classes
    OneTimeBoundsProbQueryBoundsProbQueryAlgorithm
  15. def doDistribution[T](target: Element[T]): Stream[(Double, T)]

    Permalink
    Attributes
    protected
    Definition Classes
    OneTimeProbQueryBaseProbQueryAlgorithm
  16. def doExpectation[T](target: Element[T], function: (T) ⇒ Double): Double

    Permalink
    Attributes
    protected
    Definition Classes
    OneTimeProbQueryBaseProbQueryAlgorithm
  17. def doExpectationBounds[T](target: Element[T], function: (T) ⇒ Double, bounds: Option[(Double, Double)]): (Double, Double)

    Permalink
    Attributes
    protected
    Definition Classes
    OneTimeBoundsProbQueryBoundsProbQueryAlgorithm
  18. def doKill(): Unit

    Permalink
    Attributes
    protected[com.cra.figaro.algorithm]
    Definition Classes
    OneTimeAlgorithm
  19. def doProbability[T](target: Element[T], predicate: (T) ⇒ Boolean): Double

    Permalink
    Attributes
    protected
    Definition Classes
    OneTimeProbQueryBaseProbQueryAlgorithm
  20. def doProbabilityBounds[T](target: Element[T], predicate: (T) ⇒ Boolean): (Double, Double)

    Permalink
    Attributes
    protected
    Definition Classes
    OneTimeBoundsProbQueryBoundsProbQueryAlgorithm
  21. def doProjection[T](target: Element[T]): List[(T, Double)]

    Permalink
    Attributes
    protected
    Definition Classes
    OneTimeProbQueryBaseProbQueryAlgorithm
  22. def doResume(): Unit

    Permalink
    Attributes
    protected[com.cra.figaro.algorithm]
    Definition Classes
    OneTimeAlgorithm
  23. def doStart(): Unit

    Permalink
    Attributes
    protected[com.cra.figaro.algorithm]
    Definition Classes
    OneTimeAlgorithm
  24. def doStop(): Unit

    Permalink
    Attributes
    protected[com.cra.figaro.algorithm]
    Definition Classes
    OneTimeAlgorithm
  25. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  27. def expectation[T](target: Element[T])(function: (T) ⇒ Double, c: Any = DummyImplicit): Double

    Permalink

    Return an estimate of the expectation of the function under the marginal probability distribution of the target.

    Return an estimate of the expectation of the function under the marginal probability distribution of the target. Throws NotATargetException if called on a target that is not in the list of targets of the algorithm. Throws AlgorithmInactiveException if the algorithm is inactive.

    Definition Classes
    BaseProbQueryAlgorithm
  28. def expectation[T](target: Element[T], function: (T) ⇒ Double): Double

    Permalink

    Return an estimate of the expectation of the function under the marginal probability distribution of the target.

    Return an estimate of the expectation of the function under the marginal probability distribution of the target. Throws NotATargetException if called on a target that is not in the list of targets of the algorithm. Throws AlgorithmInactiveException if the algorithm is inactive.

    Definition Classes
    BaseProbQueryAlgorithm
  29. def expectationBounds[T](target: Element[T], function: (T) ⇒ Double): (Double, Double)

    Permalink

    Return an estimate of the bounds on the expectation of the function under the marginal probability distribution of the target.

    Return an estimate of the bounds on the expectation of the function under the marginal probability distribution of the target. The function is assumed to be bounded according to the currently known values of the target. Thus, one should generally only use this when the range of the target is finite and known beforehand. Otherwise, one can use the overloaded version of this method that specifies explicit bounds on the function.

    target

    Element for which to compute bounds.

    function

    Function whose expectation is computed.

    returns

    Bounds on the expectation of this function for this element.

    Definition Classes
    BoundsProbQueryAlgorithm
    Exceptions thrown

    AlgorithmInactiveException if the algorithm is inactive.

    NotATargetException if called on a target that is not in the list of targets of the algorithm.

  30. def expectationBounds[T](target: Element[T], function: (T) ⇒ Double, lower: Double, upper: Double): (Double, Double)

    Permalink

    Return an estimate of the bounds on the expectation of the function under the marginal probability distribution of the target.

    Return an estimate of the bounds on the expectation of the function under the marginal probability distribution of the target. The function is assumed to be bounded between the specified lower and upper bounds.

    target

    Element for which to compute bounds.

    function

    Function whose expectation is computed.

    lower

    Lower bound on the function.

    upper

    Upper bound on the function.

    returns

    Bounds on the expectation of this function for this element.

    Definition Classes
    BoundsProbQueryAlgorithm
    Exceptions thrown

    AlgorithmInactiveException if the algorithm is inactive.

    IllegalArgumentException if the bounds given on the function are tighter than the actual bounds on the function, using the current known values of the target.

    NotATargetException if called on a target that is not in the list of targets of the algorithm.

  31. def finalize(): Unit

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

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

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

    Permalink

    Called when the algorithm is started before running any steps.

    Called when the algorithm is started before running any steps. By default, does nothing. Can be overridden.

    Definition Classes
    Algorithm
  35. def isActive: Boolean

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

    Permalink
    Definition Classes
    Any
  37. 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
  38. def mean(target: Element[Double]): Double

    Permalink

    Return the mean of the probability density function for the given continuous element.

    Return the mean of the probability density function for the given continuous element.

    Definition Classes
    BaseProbQueryAlgorithm
  39. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  42. def posteriorElement[T](target: Element[T], universe: Universe = Universe.universe): Element[T]

    Permalink

    Return an element representing the posterior probability distribution of the given element.

    Return an element representing the posterior probability distribution of the given element.

    Definition Classes
    ProbQueryAlgorithm
  43. def probability[T](target: Element[T], value: T): Double

    Permalink

    Return an estimate of the probability that the target produces the value.

    Return an estimate of the probability that the target produces the value. Throws NotATargetException if called on a target that is not in the list of targets of the algorithm. Throws AlgorithmInactiveException if the algorithm is inactive.

    Definition Classes
    BaseProbQueryAlgorithm
  44. def probability[T](target: Element[T])(predicate: (T) ⇒ Boolean, c: Any = DummyImplicit): Double

    Permalink

    Return an estimate of the probability of the predicate under the marginal probability distribution of the target.

    Return an estimate of the probability of the predicate under the marginal probability distribution of the target. Throws NotATargetException if called on a target that is not in the list of targets of the algorithm. Throws AlgorithmInactiveException if the algorithm is inactive.

    Definition Classes
    BaseProbQueryAlgorithm
  45. def probability[T](target: Element[T], predicate: (T) ⇒ Boolean): Double

    Permalink

    Return an estimate of the probability of the predicate under the marginal probability distribution of the target.

    Return an estimate of the probability of the predicate under the marginal probability distribution of the target. Throws NotATargetException if called on a target that is not in the list of targets of the algorithm. Throws AlgorithmInactiveException if the algorithm is inactive.

    Definition Classes
    BaseProbQueryAlgorithm
  46. def probabilityBounds[T](target: Element[T], value: T): (Double, Double)

    Permalink
    Definition Classes
    BoundsProbQueryAlgorithm
  47. def probabilityBounds[T](target: Element[T], predicate: (T) ⇒ Boolean): (Double, Double)

    Permalink

    Return an estimate of the probability of the bounds on the predicate under the marginal probability distribution of the target.

    Return an estimate of the probability of the bounds on the predicate under the marginal probability distribution of the target.

    target

    Element for which to compute bounds.

    predicate

    Function whose probability of evaluating to true is computed.

    returns

    Bounds on the probability of this function for this element.

    Definition Classes
    BoundsProbQueryAlgorithm
    Exceptions thrown

    AlgorithmInactiveException if the algorithm is inactive.

    NotATargetException if called on a target that is not in the list of targets of the algorithm.

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  53. def variance(target: Element[Double]): Double

    Permalink

    Return the variance of the probability density function for the given continuous element.

    Return the variance of the probability density function for the given continuous element.

    Definition Classes
    BaseProbQueryAlgorithm
  54. final def wait(): Unit

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

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

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

Inherited from OneTimeProbQuery

Inherited from OneTime

Inherited from BoundsProbQueryAlgorithm

Inherited from ProbQueryAlgorithm

Inherited from Algorithm

Inherited from AnyRef

Inherited from Any

Ungrouped