Domain.sample_around
- Domain.sample_around(centroids: float | int | List | ndarray, size: int | Tuple[int, int], percentage: int, **kwargs) 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.