pls module¶
The Partial Least Square (PLS) regression to reduce the dimension of a variable.
The PLS class wraps the PCA from Scikit-learn.
Dependence¶
This dimension reduction algorithm relies on the PLSRegression class of the scikit-learn library.
- class gemseo.mlearning.transformers.dimension_reduction.pls.PLS(name='PLS', n_components=None, **parameters)[source]¶
Bases:
DimensionReductionPartial Least Square regression.
- Parameters:
name (str) –
A name for this transformer.
By default it is set to “PLS”.
n_components (int | None) – The number of components of the latent space. If
None, use the maximum number allowed by the technique, typicallymin(n_samples, n_features).**parameters (float | int | bool) – The optional parameters for sklearn PCA constructor.
- compute_jacobian(data)¶
Compute the Jacobian of
transform().
- compute_jacobian_inverse(data)¶
Compute the Jacobian of the
inverse_transform().
- duplicate()¶
Duplicate the current object.
- Returns:
A deepcopy of the current instance.
- Return type:
- fit(data, *args)¶
Fit the transformer to the data.
- fit_transform(data, *args)¶
Fit the transformer to the data and transform the data.
- inverse_transform(data, *args, **kwargs)¶
Force a NumPy array to be 2D and evaluate the function
fwith it.
- transform(data, *args, **kwargs)¶
Force a NumPy array to be 2D and evaluate the function
fwith it.