pflacco.sampling#
- pflacco.sampling.create_initial_sample(dim: int, n: Optional[int] = None, sample_coefficient: int = 50, lower_bound: Union[List[float], float] = 0, upper_bound: Union[List[float], float] = 1, sample_type: str = 'lhs', seed: Optional[int] = None) DataFrame #
Sampling of the decision space.
- Parameters:
dim (int) – Dimensionality of the search space.
n (Optional[int], optional) – Fixed number of samples to create. In ELA, this is typically scaled to the dimensionalty of the problem, e.g.,
n=50*dim
, by default None.sample_coefficient (int, optional) – Factor which is used to determine the sample size in conjuction with the problem dimensionality, by default 50.
lower_bound (Union[List[float], float], optional) – Lower bound of variables of the decision space, by default 0.
upper_bound (Union[List[float], float], optional) – Upper bound of variables of the decision space, by default 1.
sample_type (str, optional) – Type of sampling strategy. Should be one of (‘lhs’, ‘random’, ‘sobol’), by default ‘lhs’.
seed (Optional[int], optional) – Seed for reproducability, by default None
- Returns:
n x dim shaped Pandas dataframe containing the different samples.
- Return type:
pd.DataFrame