Skip to main content

Crate kuji

Crate kuji 

Source
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§

NeighborSampler
Sampler for graph neighborhoods.
ReservoirSampler
A reservoir sampler that maintains a uniform sample of size k from a stream.
ReservoirSamplerR
A reservoir sampler using Algorithm R (Vitter, 1985).
SobolGenerator
Incremental Sobol sequence generator using Gray-code enumeration.
WeightedReservoirSampler
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 n Halton points in [0, 1)^d, starting from index = 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 n Owen-scrambled Sobol points in [0, 1)^d.
sobol_sequence
Generate n Sobol points in [0, 1)^d, starting from index 1 (the origin at index 0 is skipped).