gemseo / problems / scalable / data_driven

Show inherited members

model module

Scalable model.

This module implements the abstract concept of scalable model which is used by scalable disciplines. A scalable model is built from an input-output learning dataset associated with a function and generalizing its behavior to a new user-defined problem dimension, that is to say new user-defined input and output dimensions.

The concept of scalable model is implemented through ScalableModel, an abstract class which is instantiated from:

  • data provided as a Dataset

  • variables sizes provided as a dictionary whose keys are the names of inputs and outputs and values are their new sizes. If a variable is missing, its original size is considered.

Scalable model parameters can also be filled in. Otherwise, the model uses default values.

See also

The ScalableDiagonalModel class overloads ScalableModel.

class gemseo.problems.scalable.data_driven.model.ScalableModel(data, sizes=None, **parameters)[source]

Bases: object

A scalable model.

Parameters:
  • data (IODataset) – The learning dataset.

  • sizes (Mapping[str, int] | None) – The sizes of the input and output variables. If None, use the original sizes.

  • **parameters (Any) – The parameters of the model.

build_model()[source]

Build model with original sizes for input and output variables.

Return type:

None

compute_bounds()[source]

Compute lower and upper bounds of both input and output variables.

Returns:

The lower and upper bounds.

Return type:

tuple[dict[str, int], dict[str, int]]

normalize_data()[source]

Normalize the dataset from lower and upper bounds.

Return type:

None

scalable_derivatives(input_value=None)[source]

Evaluate the scalable derivatives.

Parameters:

input_value – The input values. If None, use the default inputs.

Returns:

The evaluations of the scalable derivatives.

Return type:

None

scalable_function(input_value=None)[source]

Evaluate the scalable function.

Parameters:

input_value – The input values. If None, use the default inputs.

Returns:

The evaluations of the scalable function.

Return type:

None

ABBR = 'sm'
data: IODataset

The learning dataset.

property input_names: list[str]

The input names.

property original_sizes: Mapping[str, int]

The original sizes of variables.

property output_names: list[str]

The output names.