Description Usage Arguments Details Value Examples
Systematic resampling returns a vector of ancestors based on the given weights, using only one uniform.
1 | systematic_resampling(nsamples, normalized_weights)
|
nsamples |
is a number of desired samples |
normalized_weights |
is a vector of probabilities (non-negative values summing to one) |
See Comparison of Resampling Schemes for Particle Filtering, Douc, Cappe and Moulines [https://arxiv.org/pdf/cs/0507025.pdf]
a vector of nsamples
integers between 1 and the size of normalized_weights
.
1 2 3 4 5 | N <- 1000
logweights <- rnorm(N)
normalize_weight_results <- normalize_weight(logweights)
normalized_weights <- normalize_weight_results$nw
systematic_resampling(10, normalized_weights)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.