gemseo / algos / doe

Show inherited members

doe_library module

Base DOE library.

class gemseo.algos.doe.doe_library.DOEAlgorithmDescription(algorithm_name, internal_algorithm_name, library_name='', description='', website='', handle_integer_variables=True, require_gradient=False, minimum_dimension=1)[source]

Bases: DriverDescription

The description of a DOE algorithm.

Parameters:
  • algorithm_name (str)

  • internal_algorithm_name (str)

  • library_name (str) –

    By default it is set to “”.

  • description (str) –

    By default it is set to “”.

  • website (str) –

    By default it is set to “”.

  • handle_integer_variables (bool) –

    By default it is set to True.

  • require_gradient (bool) –

    By default it is set to False.

  • minimum_dimension (int) –

    By default it is set to 1.

algorithm_name: str

The name of the algorithm in GEMSEO.

handle_integer_variables: bool = True

Whether the optimization algorithm handles integer variables.

internal_algorithm_name: str

The name of the algorithm in the wrapped library.

minimum_dimension: int = 1

The minimum dimension of the parameter space.

class gemseo.algos.doe.doe_library.DOELibrary[source]

Bases: DriverLibrary

Abstract class to use for DOE library link See DriverLibrary.

compute_doe(variables_space, n_samples=None, unit_sampling=False, **options)[source]

Compute a design of experiments (DOE) in a variables space.

Parameters:
  • variables_space (DesignSpace | int) – Either the variables space to be sampled or its dimension.

  • n_samples (int | None) – The number of samples. If None, it is deduced from the variables_spaces and the options.

  • unit_sampling (bool) –

    Whether to sample in the unit hypercube. If the value provided in variables_space is the dimension, the samples will be generated in the unit hypercube whatever the value of unit_sampling.

    By default it is set to False.

  • **options (DriverLibraryOptionType) – The options of the DOE algorithm.

Returns:

The design of experiments whose rows are the samples and columns the variables.

Return type:

RealArray

EVAL_JAC = 'eval_jac'
N_PROCESSES = 'n_processes'
N_SAMPLES = 'n_samples'
SEED = 'seed'
WAIT_TIME_BETWEEN_SAMPLES = 'wait_time_between_samples'
algo_name: str | None

The name of the algorithm used currently.

descriptions: dict[str, AlgorithmDescription]

The description of the algorithms contained in the library.

internal_algo_name: str | None

The internal name of the algorithm used currently.

It typically corresponds to the name of the algorithm in the wrapped library if any.

option_grammar: JSONGrammar | None

The grammar defining the options of the current algorithm.

problem: OptimizationProblem

The optimization problem the driver library is bonded to.

samples: RealArray

The design vector samples in the design space.

The design space variable types stored as dtype metadata.

To access those in the unit hypercube, use unit_samples.

property seed: int

The default seed used for reproducibility reasons.

unit_samples: RealArray

The design vector samples projected in the unit hypercube.

In the case of a design space of dimension \(d\), the unit hypercube is \([0,1]^d\).

To access those in the design space, use samples.

gemseo.algos.doe.doe_library.CallbackType(*args, **kwargs)

The type of a callback function in the context of a .

alias of Callable[[int, tuple[dict[str, float | ndarray], dict[str, ndarray]]], Any]

Examples using DOELibrary

Change the seed of a DOE

Change the seed of a DOE

Scaling

Scaling