selector.generators.lhs_point_generator
This module contains the latin hyper cube graph point generator.
Functions
Generate the sampling space for the Latin Hypercube (LHC) according to scenario parameters. |
|
|
Generate n samples. |
|
Generate configuration using the variable graph method. |
Classes
|
Contains the criterions of optimization of LHS. |
|
Contains the types of LHS. |
- class selector.generators.lhs_point_generator.Criterion(value)[source]
Bases:
EnumContains the criterions of optimization of LHS.
- correlation = 1
- maximin = 2
- ratio = 3
- class selector.generators.lhs_point_generator.LHSType(value)[source]
Bases:
EnumContains the types of LHS.
- centered = 2
- classic = 1
- selector.generators.lhs_point_generator.generate_space(s)[source]
Generate the sampling space for the Latin Hypercube (LHC) according to scenario parameters.
- Parameters:
s (selector.scenario.Scenario) – AC scenario.
- Returns:
Latin Hypercube space.
- Return type:
skopt.Space object
- selector.generators.lhs_point_generator.get_n_points(space, n_samples, seed, lhs_type, criterion)[source]
Generate n samples.
- Parameters:
space (skopt.Space object) – Sampling space for the Latin Hypercube (LHC).
n_samples (int) – Number of samples to generate.
seed (int) – Random seed; will be set if not False.
lhs_type – Sampling type parameter for skopt.sampler.Lhs.
criterion – Optimization criterion for skopt.sampler.Lhs.
- Returns:
Generated n samples.
- Return type:
list of dict
- selector.generators.lhs_point_generator.lhc_points(s, identity, n_samples=1, seed=False, lhs_type=LHSType.classic, criterion=None)[source]
Generate configuration using the variable graph method.
- Parameters:
s (selector.scenario.Scenario) – AC scenario.
identity (uuid.UUID) – This UUID is just a placeholder.
n_samples (int) – Number of picks from the parameter space.
seed (int) – Random seed.
lhs_type (selector.generators.lhs_point_generator.LHSType) – Type of LHC sampling.
criterion (selector.generators.lhs_point_generator.Criterion) – Criterions of LHC optimizatio.
- Returns:
List of generated configurations.
- Return type:
list of selector.pool.Configuration