Package

com.cra.figaro.algorithm.sampling

parallel

Permalink

package parallel

Visibility
  1. Public
  2. All

Type Members

  1. trait ParAnytime extends ParSamplingAlgorithm

    Permalink

    Parallel anytime sampling algorithms.

    Parallel anytime sampling algorithms. These algorithms have a parallel collection of algorithm instances that will do their work on separate threads, over separate universes.

  2. trait ParOneTime extends ParSamplingAlgorithm with OneTime

    Permalink

    Parallel one-time sampling algorithms.

    Parallel one-time sampling algorithms. These algorithms have multiple instances that execute across multiple threads.

  3. abstract class ParSampler extends BaseProbQuerySampler[Reference] with ParSamplingAlgorithm

    Permalink

    Parallel version of a sampling algorithm.

    Parallel version of a sampling algorithm. Has a parallel collection of algorithm instances that will do its work on separate threads, over separate universes. Uses Scala's parallel collections to divide up the work, so it will work best if told to run on a number of threads less than or equal to the number of worker threads Scala creates when operating over parallel collections.

    This creates two major differences with how a user interacts with the algorithm. First of all, rather than defining a model on a universe and then starting the algorithm, the user must define a function that generates a universe and applies any evidence, and then pass that to the companion object to create the algorithm. The second major difference is that elements must be referred to using references, since each variable will exist as multiple elements across the different universes.

    One-time sampling will be faster, since it divides the work over the different threads. Anytime sampling should provide more accurate results, since it can take more samples over the same amount of time. Both cases will most likely require more memory, at least using the current implementation of WeightedSampler, which keeps track of all values and weights that have been sampled. When querying, a weighted combination of the results of the various threads is returned. This last step adds some overhead, which should be negligible as long as you are taking a large number of samples.

  4. trait ParSamplingAlgorithm extends Algorithm

    Permalink

    Parallel sampling algorithms.

    Parallel sampling algorithms. These algorithms have a parallel collection of algorithm instances that will do their work on separate threads, over separate universes.

Value Members

  1. object ParImportance

    Permalink

Ungrouped