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.
Classes:
|
Partial Least Square regression. |
- class gemseo.mlearning.transform.dimension_reduction.pls.PLS(name='PLS', n_components=5, **parameters)[source]¶
Bases:
gemseo.mlearning.transform.dimension_reduction.dimension_reduction.DimensionReduction
Partial Least Square regression.
- name¶
The name of the transformer.
- Type
str
- parameters¶
The parameters of the transformer.
- Type
str
- Parameters
**parameters (Union[float,int,bool]) – The optional parameters for sklearn PCA constructor.
name (str) –
By default it is set to PLS.
n_components (int) –
By default it is set to 5.
- Return type
None
Attributes:
The principal components.
The number of components.
Methods:
compute_jacobian
(data)Compute Jacobian of transformer.transform().
compute_jacobian_inverse
(data)Compute Jacobian of the transformer.inverse_transform().
Duplicate the current object.
fit
(data, other_data)Fit the transformer to the data.
fit_transform
(data, *args)Fit the transformer to the data and transform the data.
inverse_transform
(data)Perform an inverse transform on the data.
transform
(data)Transform the data.
- CROSSED = True¶
- property components¶
The principal components.
- compute_jacobian(data)[source]¶
Compute Jacobian of transformer.transform().
- Parameters
data (numpy.ndarray) – The data where the Jacobian is to be computed.
- Returns
The Jacobian matrix.
- Return type
NoReturn
- compute_jacobian_inverse(data)[source]¶
Compute Jacobian of the transformer.inverse_transform().
- Parameters
data (numpy.ndarray) – The data where the Jacobian is to be computed.
- Returns
The Jacobian matrix.
- Return type
NoReturn
- duplicate()¶
Duplicate the current object.
- Returns
A deepcopy of the current instance.
- Return type
- fit(data, other_data)[source]¶
Fit the transformer to the data.
- Parameters
data (numpy.ndarray) – The data to be fitted.
other_data (numpy.ndarray) –
- Return type
None
- fit_transform(data, *args)¶
Fit the transformer to the data and transform the data.
- Parameters
data (numpy.ndarray) – The data to be transformed.
*args (Union[float, int, str]) –
- Returns
The transformed data.
- Return type
numpy.ndarray
- inverse_transform(data)[source]¶
Perform an inverse transform on the data.
- Parameters
data (numpy.ndarray) – The data to be inverse transformed.
- Returns
The inverse transformed data.
- Return type
numpy.ndarray
- property n_components¶
The number of components.