selector.generators.lhs_point_generator

This module contains the latin hyper cube graph point generator.

Functions

generate_space(s)

Generate the sampling space for the Latin Hypercube (LHC) according to scenario parameters.

get_n_points(space, n_samples, seed, ...)

Generate n samples.

lhc_points(s, identity[, n_samples, seed, ...])

Generate configuration using the variable graph method.

Classes

Criterion(value)

Contains the criterions of optimization of LHS.

LHSType(value)

Contains the types of LHS.

class selector.generators.lhs_point_generator.Criterion(value)[source]

Bases: Enum

Contains the criterions of optimization of LHS.

correlation = 1
maximin = 2
ratio = 3
class selector.generators.lhs_point_generator.LHSType(value)[source]

Bases: Enum

Contains 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:
Returns:

List of generated configurations.

Return type:

list of selector.pool.Configuration