pypomp.Pomp.sample_params¶
- static Pomp.sample_params(param_bounds: dict[str, tuple[float, float]], n: int, key: Array) PompParameters¶
Sample
nparameter sets uniformly within specified bounds.Generates random parameter vectors from independent uniform distributions. Commonly used to create diverse starting points for global optimization (e.g. before running
mif()in parallel).- Parameters:
- Returns:
A
PompParametersobject withnparameter rows drawn uniformly fromparam_bounds.- Return type:
Examples
>>> import jax >>> import pypomp as pp >>> bounds = {"beta": (0.1, 1.0), "gamma": (0.05, 0.5)} >>> theta = pp.Pomp.sample_params(bounds, n=20, key=jax.random.key(0)) >>> theta.num_replicates() 20