IntervalMasked.sample_around
- IntervalMasked.sample_around(centroids: float | int | List | ndarray, size: int | Tuple[int, int] = 1, percentage: int = 10, min_value: float | int | None = None, max_value: float | int | None = None) ndarray [source]
Returns samples chosen with a sample around strategy from the domain.
- Parameters:
centroids (np.ndarray) – The values at each dimension to sample around.
size (Tuple[int, int]) – A tuple indicating the number of samples and the dimension, i.e. (number_sample, dim).
percentage (float) – Controls the sampling.
kwargs – Additional arguments depending on the domain.
- Returns:
np.ndarray – The generated samples from the domain.