Skip to main content

Module functions

Module functions 

Source
Expand description

Auto-generated module

🤖 Generated with SplitRS

Traits§

QuasiRandomSequence
Trait for quasi-random sequences.

Functions§

blue_noise_2d
Generate 2D Poisson disk (blue noise) samples using Bridson’s algorithm.
bootstrap_mean_ci
Bootstrap estimate of the mean and its 95% confidence interval.
bootstrap_resample
Bootstrap resample data with replacement, returning n resampled datasets.
effective_sample_size
Effective sample size (ESS) from normalized importance weights.
halton_multivariate
Generate n multi-dimensional Halton points using the first n_dims primes as bases.
halton_sequence
Van der Corput / Halton sequence in a given base. Returns n values in [0,1).
importance_sample
Discrete inverse-CDF (importance) sampling.
importance_sampling_estimate
Compute IS estimate of E\[h(X)\] where X ~ target but samples are drawn from proposal.
importance_weights
Compute unnormalized importance weights for a set of samples.
latin_hypercube_sample
Latin Hypercube Sample: n points in d dimensions, each in [0,1).
lhs_maximin
Latin Hypercube Sampling with maximin distance optimization.
mc_antithetic
Antithetic variates Monte Carlo estimator.
mc_control_variate
Control-variate Monte Carlo estimator.
monte_carlo_integrate
Monte Carlo integration of f over \[a, b\] using n uniform samples.
monte_carlo_integrate_nd
Monte Carlo integration of f over the unit hypercube \[0,1)^d in d dimensions.
qmc_integrate_halton
Quasi-Monte Carlo integration using the Halton sequence.
qmc_integrate_sobol
Quasi-Monte Carlo integration using the 1-D Sobol sequence.
rejection_sample_1d
Draw n samples from an arbitrary 1-D PDF using rejection sampling.
rejection_sample_2d
2-D rejection sampling.
sample_gaussian_3d
Sample a 3-D Gaussian vector with zero mean and isotropic standard deviation sigma.
sample_maxwell_boltzmann
Sample a 3-D velocity vector from the Maxwell–Boltzmann distribution.
sample_sphere_surface
Sample a point uniformly on the surface of the unit sphere (Marsaglia 1972).
sample_sphere_volume
Sample a point uniformly inside the closed unit ball (rejection sampling).
self_normalized_is
Self-normalized importance sampling estimator for E_target\[h(X)\].
sobol_sequence
Sobol’ quasi-random sequence: n points in d dimensions (up to 3 dims).
sobol_sequence_10d
Generate n Sobol points in 10 dimensions.
stratified_sample_1d
Stratified 1-D sampling.
stratified_sample_1d_rng
Stratified (jittered) 1-D samples using rand::Rng.
stratified_sample_nd
Generate n_samples stratified samples in n_dims dimensions.
stratified_unit_hypercube
Generate n_samples stratified samples over the unit hypercube \[0,1)^d.
systematic_resample
Systematic resampling for particle filters.