gemseo.mlearning.regression.algos.ot_gpr module#

Gaussian process regression.

class OTGaussianProcessRegressor(data, settings_model=None, **settings)[source]#

Bases: BaseRandomProcessRegressor

Gaussian process regression.

Parameters:
  • data (Dataset) -- The learning dataset.

  • settings_model (BaseMLAlgoSettings | None) -- The machine learning algorithm settings as a Pydantic model. If None, use **settings.

  • **settings (Any) -- The machine learning algorithm settings. These arguments are ignored when settings_model is not None.

Raises:

ValueError -- When both the variable and the group it belongs to have a transformer.

Settings#

alias of OTGaussianProcessRegressor_Settings

compute_samples(input_data, n_samples, seed=None)[source]#

Sample a random vector from the conditioned Gaussian process.

Parameters:
  • input_data (NumberArray) -- The \(N\) input points of dimension \(d\) at which to observe the conditioned Gaussian process; shaped as (N, d).

  • n_samples (int) -- The number of samples M.

  • seed (int | None) -- The seed for reproducible results.

Returns:

The output samples shaped as (M, N, p) where p is the output dimension.

Return type:

NumberArray

predict_std(input_data)[source]#

Predict the standard deviation from input data.

Parameters:

input_data (DataType) -- The input data with shape (n_samples, n_inputs).

Returns:

The output data with shape (n_samples, n_outputs).

Return type:

output_data

HMATRIX_ASSEMBLY_EPSILON: ClassVar[float] = 1e-05#

The epsilon for the assembly of the H-matrix.

Used when use_hmat is True.

HMATRIX_RECOMPRESSION_EPSILON: ClassVar[float] = 0.0001#

The epsilon for the recompression of the H-matrix.

Used when use_hmat is True.

LIBRARY: ClassVar[str] = 'OpenTURNS'#

The name of the library of the wrapped machine learning algorithm.

MAX_SIZE_FOR_LAPACK: ClassVar[int] = 100#

The maximum size of the learning dataset to use LAPACK as linear algebra library.

Use HMAT otherwise.

SHORT_ALGO_NAME: ClassVar[str] = 'GPR'#

The short name of the machine learning algorithm, often an acronym.

Typically used for composite names, e.g. f"{algo.SHORT_ALGO_NAME}_{dataset.name}" or f"{algo.SHORT_ALGO_NAME}_{discipline.name}".

property use_hmat: bool#

Whether to use the HMAT linear algebra method or LAPACK.