mccube._kernels.random
MonteCarloKernel
¤
Bases: AbstractRecombinationKernel
Monte Carlo particle sub-sampling/recombination.
Example
Attributes:
-
recombination_count–indicates the requested size of the recombined dimension.
-
with_replacement(bool) –if to perform sub-sampling with or without replacement.
-
weighting_function(Callable[[Weights], Weights | None]) –allows particle weights to be transformed. If the transform returns :code:
Nonethen the weights are assumed/implicitly uniform. -
key(PRNGKeyArray) –the base PRNGKey required for Monte Carlo sampling.
MonteCarloPartitioningKernel
¤
Bases: AbstractPartitioningKernel
Monte carlo particle resampling/partitioning.
Rather than using the Monte Carlo method to reduce/recombine the particles, as in
mccube.MonteCarloKernel, here the method is used simply to assign particles
to \(m\) equally sized partitions.
Example
Attributes:
-
partition_count–indicates the requested number of partitions, \(m\).
-
monte_carlo_kernel(MonteCarloKernel) –the base monte carlo kernel used for random partition assignment, with arbitrary
recombination_count(as this count is overriden based on thepartition_count).