Packages

class OneTimeLSVE extends LazyStructuredVE with OneTimeLazyStructuredProbQuery

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. OneTimeLSVE
  2. OneTimeLazyStructuredProbQuery
  3. OneTimeBoundsProbQuery
  4. OneTimeStructuredProbQuery
  5. OneTimeProbQuery
  6. OneTimeLazyStructured
  7. OneTimeStructured
  8. OneTime
  9. LazyStructuredVE
  10. LazyStructuredProbQueryAlgorithm
  11. BoundsProbQueryAlgorithm
  12. LazyStructured
  13. StructuredProbQueryAlgorithm
  14. ProbQueryAlgorithm
  15. BaseProbQueryAlgorithm
  16. StructuredAlgorithm
  17. Algorithm
  18. AnyRef
  19. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new OneTimeLSVE(depth: Int, universe: Universe, targets: Element[_]*)

Type Members

  1. class NotATargetException [T] extends AlgorithmException
    Definition Classes
    BaseProbQueryAlgorithm

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val active: Boolean
    Attributes
    protected
    Definition Classes
    Algorithm
  5. def allProbabilityBounds[T](target: Element[T]): Stream[(Double, Double, T)]

    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
    Definition Classes
    Any
  7. def boundFactors[T](target: Element[T]): (Factor[Double], Factor[Double])

    Get the marginalized lower/upper factors for a particular target.

    Get the marginalized lower/upper factors for a particular target. This method is intended to be called once per inference query, and avoids concurrency issues. It guarantees that the factors returned are consistent and from a single solving run. Returns a pair containing, respectively, the marginalized factor computed using lower constraint bounds, and the marginalized factor computed using upper constraint bounds.

    Attributes
    protected
    Definition Classes
    LazyStructuredProbQueryAlgorithm
  8. def boundValues(values: Set[Double], bounds: Option[(Double, Double)]): (Double, Double)

    Helper function to compute lower and upper bounds on the given values using the optional bounds given and the double values of a target variable.

    Helper function to compute lower and upper bounds on the given values using the optional bounds given and the double values of a target variable. If bounds are given, it checks that all regular values are within the desired bounds. Otherwise, it returns the strongest possible bounds given the current values. If there are no values, it returns (-Infinity, Infinity).

    Attributes
    protected
    Definition Classes
    LazyStructuredProbQueryAlgorithm
  9. def check[T](target: Element[T]): Unit
    Attributes
    protected
    Definition Classes
    BaseProbQueryAlgorithm
  10. def checkConstraintBounds(): Unit

    Verify that all constraint factors satisfy the bounds needed for the correctness of this algorithm.

    Verify that all constraint factors satisfy the bounds needed for the correctness of this algorithm. This gets executed before solving. By default, this method does nothing; subclasses can override this to throw an exception if the bounds requirements are not met.

    Definition Classes
    LazyStructuredStructuredAlgorithm
  11. def cleanUp(): Unit

    Called when the algorithm is killed.

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

    Definition Classes
    Algorithm
  12. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. val collection: ComponentCollection
    Definition Classes
    StructuredAlgorithm
  14. def computeAllProbabilityBounds[T](target: Element[T]): Stream[(Double, Double, T)]

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

    Computes the normalized distribution over a single target element.

    Computes the normalized distribution over a single target element. Throws an IllegalArgumentException if the range of the target contains star, or if lower and upper bounds are needed.

    Definition Classes
    StructuredProbQueryAlgorithmBaseProbQueryAlgorithm
  16. def computeExpectation[T](target: Element[T], function: (T) ⇒ Double): Double

    Computes the expectation of a given function for single target element.

    Computes the expectation of a given function for single target element. Throws an IllegalArgumentException if the range of the target contains star, or if lower and upper bounds are needed.

    Definition Classes
    StructuredProbQueryAlgorithmBaseProbQueryAlgorithm
  17. def computeExpectationBounds[T](target: Element[T], function: (T) ⇒ Double, bounds: Option[(Double, Double)]): (Double, Double)

    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
    LazyStructuredProbQueryAlgorithmBoundsProbQueryAlgorithm
  18. def computeProbability[T](target: Element[T], predicate: (T) ⇒ Boolean): Double

    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
  19. def computeProbabilityBounds[T](target: Element[T], predicate: (T) ⇒ Boolean): (Double, Double)

    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
  20. def computeProjection[T](target: Element[T]): List[(T, Double)]
    Attributes
    protected[com.cra.figaro.algorithm]
    Definition Classes
    BaseProbQueryAlgorithm
  21. val depth: Int
    Definition Classes
    OneTimeLSVELazyStructuredVE
  22. def distribution(target: List[Element[_]]): (List[(String, ProblemComponent[_])], List[(Double, List[Extended[_]])])
    Definition Classes
    StructuredProbQueryAlgorithm
  23. def distribution[T](target: Element[T]): Stream[(Double, T)]

    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
  24. def doAllProbabilityBounds[T](target: Element[T]): Stream[(Double, Double, T)]
    Attributes
    protected
    Definition Classes
    OneTimeBoundsProbQueryBoundsProbQueryAlgorithm
  25. def doDistribution[T](target: Element[T]): Stream[(Double, T)]
    Attributes
    protected
    Definition Classes
    OneTimeProbQueryBaseProbQueryAlgorithm
  26. def doExpectation[T](target: Element[T], function: (T) ⇒ Double): Double
    Attributes
    protected
    Definition Classes
    OneTimeProbQueryBaseProbQueryAlgorithm
  27. def doExpectationBounds[T](target: Element[T], function: (T) ⇒ Double, bounds: Option[(Double, Double)]): (Double, Double)
    Attributes
    protected
    Definition Classes
    OneTimeBoundsProbQueryBoundsProbQueryAlgorithm
  28. def doKill(): Unit
    Attributes
    protected[com.cra.figaro.algorithm]
    Definition Classes
    OneTimeAlgorithm
  29. def doProbability[T](target: Element[T], predicate: (T) ⇒ Boolean): Double
    Attributes
    protected
    Definition Classes
    OneTimeProbQueryBaseProbQueryAlgorithm
  30. def doProbabilityBounds[T](target: Element[T], predicate: (T) ⇒ Boolean): (Double, Double)
    Attributes
    protected
    Definition Classes
    OneTimeBoundsProbQueryBoundsProbQueryAlgorithm
  31. def doProjection[T](target: Element[T]): List[(T, Double)]
    Attributes
    protected
    Definition Classes
    OneTimeProbQueryBaseProbQueryAlgorithm
  32. def doResume(): Unit
    Attributes
    protected[com.cra.figaro.algorithm]
    Definition Classes
    OneTimeAlgorithm
  33. def doStart(): Unit
    Attributes
    protected[com.cra.figaro.algorithm]
    Definition Classes
    OneTimeAlgorithm
  34. def doStop(): Unit
    Attributes
    protected[com.cra.figaro.algorithm]
    Definition Classes
    OneTimeAlgorithm
  35. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  36. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  37. def expectation[T](target: Element[T])(function: (T) ⇒ Double, c: Any = DummyImplicit): Double

    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
  38. def expectation[T](target: Element[T], function: (T) ⇒ Double): Double

    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
  39. def expectationBounds[T](target: Element[T], function: (T) ⇒ Double): (Double, Double)

    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.

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

    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.

  41. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  42. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  43. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  44. val initialElements: List[Element[_]]

    Initial elements to pass to the bottom-up strategy for decomposition.

    Initial elements to pass to the bottom-up strategy for decomposition. Defaults to a list containing all problem targets and all evidence elements in the universe.

    Definition Classes
    LazyStructuredVE
  45. def initialize(): Unit

    Initialize the problem by adding all permanent elements to it.

    Initialize the problem by adding all permanent elements to it. This is to ensure that all top-level elements are correctly added to the top-level problem.

    Definition Classes
    LazyStructuredVEStructuredAlgorithmAlgorithm
  46. def isActive: Boolean
    Definition Classes
    Algorithm
  47. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  48. 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
  49. def mean(target: Element[Double]): Double

    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
  50. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  51. def neededBounds(): Set[Bounds]

    All bounds for which this algorithm needs to compute solutions.

    All bounds for which this algorithm needs to compute solutions. This is determined by looking for components that have * in their range, and have constraint factors associated with them. If such a component exists, we need both lower and upper bounds. Otherwise, just one of the bounds suffices because they are equivalent; it defaults to lower in this case.

    returns

    All bounds for which this algorithm should compute solutions.

    Definition Classes
    StructuredAlgorithm
  52. final def notify(): Unit
    Definition Classes
    AnyRef
  53. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  54. def posteriorElement[T](target: Element[T], universe: Universe = Universe.universe): Element[T]

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

    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
  56. def probability[T](target: Element[T])(predicate: (T) ⇒ Boolean, c: Any = DummyImplicit): Double

    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
  57. def probability[T](target: Element[T], predicate: (T) ⇒ Boolean): Double

    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
  58. def probabilityBounds[T](target: Element[T], value: T): (Double, Double)
    Definition Classes
    BoundsProbQueryAlgorithm
  59. def probabilityBounds[T](target: Element[T], predicate: (T) ⇒ Boolean): (Double, Double)

    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.

  60. val problem: Problem

    Inference problem to be solved.

    Inference problem to be solved.

    Definition Classes
    StructuredAlgorithm
  61. def problemTargets: List[Element[_]]

    List of targets that should not be eliminated when solving the problem.

    List of targets that should not be eliminated when solving the problem.

    returns

    Targets for the problem.

    Definition Classes
    StructuredProbQueryAlgorithmStructuredAlgorithm
  62. def processSolutions(solutions: Map[Bounds, Solution]): Unit

    Extract the solution in a way that allows fast queries to the algorithm.

    Extract the solution in a way that allows fast queries to the algorithm. This usually involves storing some form of the solution in a variable, but the exact implementation is up to the algorithm that overrides this.

    solutions

    A map from bounds to computed solutions for those bounds. Contains one key for each of the bounds needed, according to neededBounds().

    Definition Classes
    StructuredProbQueryAlgorithmStructuredAlgorithm
  63. val queryTargets: Element[_]*
  64. def rangingStrategy: RangingStrategy

    Uses the default lazy ranging strategy with ParticleGenerator.defaultNumSamplesFromAtomics values.

    Uses the default lazy ranging strategy with ParticleGenerator.defaultNumSamplesFromAtomics values.

    Definition Classes
    OneTimeLSVEOneTimeLazyStructuredOneTimeStructuredStructuredAlgorithm
  65. def refiningStrategy(): RefiningStrategy

    Strategy to use for refinement at a single iteration.

    Strategy to use for refinement at a single iteration. This may return a new strategy for each iteration.

    returns

    A refining strategy to be used for a single iteration.

    Definition Classes
    LazyStructuredVEStructuredAlgorithm
  66. def regularAndStarBounds[T](lowerFactor: Factor[Double], upperFactor: Factor[Double]): (List[(Double, Double, T)], Double, Double)

    Computes bounds on each regular and extended value given lower and upper factors marginalized to a single variable.

    Computes bounds on each regular and extended value given lower and upper factors marginalized to a single variable. The first entry contains bounds on each regular value as a list of triples (lower, upper, value). The second and third entries are, respectively, the lower and upper bounds on *. These are bounds on the probability mass that could be placed on values not yet in the range of the target.

    Attributes
    protected
    Definition Classes
    LazyStructuredProbQueryAlgorithm
  67. 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
  68. def run(): Unit

    Run the algorithm, performing its computation to completion.

    Run the algorithm, performing its computation to completion.

    Definition Classes
    OneTimeStructuredOneTime
  69. def runStep(): Unit

    Run a single iteration of refinement/solving, then record the solutions.

    Run a single iteration of refinement/solving, then record the solutions.

    Definition Classes
    StructuredAlgorithm
  70. def solvingStrategy(): SolvingStrategy

    Strategy to use for solving at a single iteration.

    Strategy to use for solving at a single iteration. This may return a new strategy for each iteration.

    returns

    A solving strategy to be used for a single iteration.

    Definition Classes
    LazyStructuredVEStructuredAlgorithm
  71. 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
  72. 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
  73. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  74. var targetFactors: Map[Bounds, Map[Element[_], Factor[Double]]]
    Attributes
    protected
    Definition Classes
    StructuredProbQueryAlgorithm
  75. def toString(): String
    Definition Classes
    AnyRef → Any
  76. val universe: Universe
    Definition Classes
    StructuredAlgorithm
  77. def useBoundsString: String
    Attributes
    protected
    Definition Classes
    LazyStructuredProbQueryAlgorithmStructuredProbQueryAlgorithm
  78. def variance(target: Element[Double]): Double

    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
  79. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  80. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  81. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from OneTimeBoundsProbQuery

Inherited from OneTimeProbQuery

Inherited from OneTimeLazyStructured

Inherited from OneTimeStructured

Inherited from OneTime

Inherited from LazyStructuredVE

Inherited from BoundsProbQueryAlgorithm

Inherited from LazyStructured

Inherited from ProbQueryAlgorithm

Inherited from StructuredAlgorithm

Inherited from Algorithm

Inherited from AnyRef

Inherited from Any

Ungrouped