gemseo.mlearning.regression.algos.ot_gpr module#
Gaussian process regression.
- class OTGaussianProcessRegressor(data, settings_model=None, **settings)[source]#
Bases:
BaseRandomProcessRegressorGaussian process regression.
Initialize self. See help(type(self)) for accurate signature.
- Parameters:
data (Dataset) -- The training 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_modelis notNone.
- 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:
- Returns:
The output samples shaped as \((M, N, p)\) where \(p\) is the output dimension.
- Return type:
RealArray
- predict_covariance(input_data)[source]#
Predict the covariance matrix from input data.
- Parameters:
input_data (RealArray) -- The \(N\) input points of dimension \(d\) at which to observe the conditioned Gaussian process; shaped as \((N, d)\).
- Returns:
- The posterior covariance matrix at the input points
of shape \((Np, Np)\) with \(p\) the output dimension. The covariance between the \(k\)-th output at the \(i\)-th input point and the \(l\)-th output at the \(j\)-th input point is located at the \(m\)-th line and \(n\)-th column with \(m=ip+k\), \(n=jp+l\), \(i,j\in\{0,\ldots,N-1\}\) and \(k,l\in\{0,\ldots,p-1\}\).
Warning
This statistic is expressed in relation to the transformed output space. You can sample the
predict()method to estimate it in relation to the original output space if it is different from the transformed output space.- Return type:
RealArray
- 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 training dataset to use LAPACK as linear algebra library.
Use HMAT otherwise.