gov.sandia.cognition.statistics.method
Class ImportanceSampling

java.lang.Object
  extended by gov.sandia.cognition.statistics.method.ImportanceSampling

@PublicationReference(author="Wikipedia",
                      title="Importance Sampling",
                      type=WebPage,
                      year=2009,
                      url="http://en.wikipedia.org/wiki/Importance_sampling")
public class ImportanceSampling
extends Object

Importance sampling is a technique for estimating properties of a target distribution, while only having samples generated from an "importance" distribution rather than the target distribution. Typically, the importance distribution is easy to sample from, while the target distribution is difficult to sample from, and the importance distribution has support everywhere that the target distribution has support. Then, this results in an weighted set of samples that are an unbiased sampling of the target distribution.

Since:
3.0
Author:
Kevin R. Dixon

Constructor Summary
ImportanceSampling()
           
 
Method Summary
static
<ValueType>
ArrayList<DefaultWeightedValue<ValueType>>
sample(ProbabilityDensityFunction<ValueType> importanceDistribution, Evaluator<ValueType,Double> targetDistribution, Random random, int numSamples)
          Importance sampling is a technique for estimating properties of a target distribution, while only having samples generated from an "importance" distribution rather than the target distribution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportanceSampling

public ImportanceSampling()
Method Detail

sample

public static <ValueType> ArrayList<DefaultWeightedValue<ValueType>> sample(ProbabilityDensityFunction<ValueType> importanceDistribution,
                                                                            Evaluator<ValueType,Double> targetDistribution,
                                                                            Random random,
                                                                            int numSamples)
Importance sampling is a technique for estimating properties of a target distribution, while only having samples generated from an "importance" distribution rather than the target distribution. Typically, the importance distribution is easy to sample from, while the target distribution is difficult to sample from, and the importance distribution has support everywhere that the target distribution has support. Then, this results in an weighted set of samples that are an unbiased sampling of the target distribution.

Type Parameters:
ValueType - Domain type of the distributions.
Parameters:
importanceDistribution - Easy-to-sample-from distribution that will generate the samples.
targetDistribution - The hard-to-sample-from distribution that is desired.
random - Random number generator.
numSamples - Number of samples to create.
Returns:
Weighted samples that are an unbiased estimate of the target distribution.