gemseo_mlearning

api module

Some useful functions for machine learning.

gemseo_mlearning.api.sample_discipline(discipline, input_space, output_names, algo_name, n_samples, name=None, **algo_options)[source]

Sample a discipline.

Parameters:
  • discipline (MDODiscipline) – The discipline to be sampled.

  • input_space (DesignSpace) – The input space on which to sample the discipline.

  • output_names (str | Iterable[str]) – The names of the outputs of interest.

  • algo_name (str) – The name of the DOE algorithm.

  • n_samples (int) – The number of samples.

  • name (str) – The name of the returned dataset. If None, use the name of the discipline.

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

Returns:

The input-output samples of the disciplines.

Return type:

Dataset

gemseo_mlearning.api.sample_disciplines(disciplines, formulation, input_space, output_names, algo_name, n_samples, name=None, formulation_options=None, **algo_options)[source]

Sample several disciplines based on an MDO formulation.

Parameters:
  • disciplines (Sequence[MDODiscipline]) – The disciplines to be sampled.

  • formulation (str) – The name of the MDO formulation.

  • input_space (DesignSpace) – The input space on which to sample the discipline.

  • output_names (str | Iterable[str]) – The names of the outputs of interest.

  • algo_name (str) – The name of the DOE algorithm.

  • n_samples (int) – The number of samples.

  • name (str) – The name of the returned dataset. If None, use the name of the discipline.

  • formulation_options (Mapping[str, Any]) – The options of the MDO formulation. If None, use the default ones.

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

Returns:

The input-output samples of the disciplines.

Return type:

Dataset