earthkit.meteo.score.array.bootstrap

earthkit.meteo.score.array.bootstrap(func, x, *args, dim=0, out_dim=0, n_iter=100, n_samples=None, replace=True, rng=None, **kwargs)

Run bootstrapping.

Parameters:
  • func (function ((array, ..., **kwargs) -> array)) – Function to bootstrap

  • x (array-like) – Inputs to function, sampled for bootstrapping. Must have the same size along dim

  • *args (array-like) – Inputs to function, sampled for bootstrapping. Must have the same size along dim

  • dim (int or list of int) – Sample along this dimension index (either same for all or one per argument)

  • out_dim (int) – Stack samples along this dimension index

  • n_iter (int) – Number of bootstrapping iterations

  • n_samples (int or None) – Number of samples for each iteration. If None, use the number of inputs (size of x along the sampling dimension)

  • replace (bool) – Sample with replacement (on by default)

  • rng (numpy.random.Generator) – Random number generator

  • **kwargs – Additional keyword arguments to func

Returns:

Aggregated results of the bootstrapping process

Return type:

array-like