Expand description
Compatibility crate for the kuji to drawset rename.
New code should depend on drawset.
Modules§
- gumbel
- Gumbel-max sampling.
- neighbor
- Graph neighbor sampling.
- qmc
- Quasi-Monte Carlo sequences.
- reservoir
- Reservoir sampling.
- thinning
- Kernel thinning: coreset selection minimizing kernel discrepancy.
Structs§
- Neighbor
Sampler - Sampler for graph neighborhoods.
- Reservoir
Sampler - A reservoir sampler that maintains a uniform sample of size
kfrom a stream. - Reservoir
SamplerR - A reservoir sampler using Algorithm R (Vitter, 1985).
- Sobol
Generator - Incremental Sobol sequence generator using Gray-code enumeration.
- Weighted
Reservoir Sampler - A weighted reservoir sampler (Efraimidis-Spirakis, A-Res).
Functions§
- gumbel_
max_ sample - Sample an index using the Gumbel-max trick.
- gumbel_
noise - Generate Gumbel noise: G = -log(-log(U)) where U ~ Uniform(0, 1).
- gumbel_
softmax - Gumbel-Softmax: differentiable approximation to categorical sampling.
- gumbel_
topk_ sample - Sample k indices without replacement using the Gumbel-top-k trick.
- gumbel_
topk_ sample_ with_ rng - Gumbel-top-k with a caller-supplied RNG (for tests/benchmarks).
- halton_
point - Compute a single Halton point in
[0, 1)^d. - halton_
sequence - Generate
nHalton points in[0, 1)^d, starting fromindex = 1. - kernel_
herd - Kernel herding: deterministic sampling via greedy mean embedding matching.
- kernel_
thin - Greedy kernel thinning via MMD minimization.
- mmd_
sq_ from_ gram - Compute MMD^2 (biased) between a subset and the full set from a Gram matrix.
- relaxed_
topk_ gumbel - Relaxed Top-K via Gumbel-Softmax.
- sobol_
scrambled - Generate
nOwen-scrambled Sobol points in[0, 1)^d. - sobol_
sequence - Generate
nSobol points in[0, 1)^d, starting from index 1 (the origin at index 0 is skipped).