Skip to content

voiage.parallel.monte_carlo.parallel_bootstrap_sampling

parallel_bootstrap_sampling([positional or keyword] data: np.ndarray = None, [positional or keyword] statistic_func: Callable[[np.ndarray], float] = None, [positional or keyword] n_bootstrap_samples: int = 1000, [positional or keyword] n_workers: int | None = None, [positional or keyword] use_processes: bool = True) -> dict[str, float | np.ndarray]

Perform bootstrap sampling using parallel processing.

Args: data: Input data array statistic_func: Function to calculate statistic on bootstrap samples n_bootstrap_samples: Number of bootstrap samples n_workers: Number of parallel workers use_processes: Whether to use processes or threads

Dict with bootstrap statistics (mean, std, percentiles)

Parameters:

  • data np.ndarray
  • statistic_func Callable[[np.ndarray], float]
  • n_bootstrap_samples int (default: 1000)
  • n_workers int | None (default: None)
  • use_processes bool (default: True)

Returns: dict[str, float | np.ndarray]