pca module¶
The Principal Component Analysis (PCA) to reduce the dimension of a variable.
The PCA
class wraps the PCA from Scikit-learn.
Dependence¶
This dimension reduction algorithm relies on the PCA class of the scikit-learn library.
- class gemseo.mlearning.transformers.dimension_reduction.pca.PCA(name='', n_components=None, scale=False, **parameters)[source]¶
Bases:
DimensionReduction
Principal component dimension reduction algorithm.
- Parameters:
name (str) –
A name for this transformer.
By default it is set to “”.
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)
.scale (bool) –
Whether to scale the data before applying the PCA.
By default it is set to False.
**parameters (float | int | str | bool | None) – The optional parameters for sklearn PCA constructor.
- compute_jacobian(data, *args, **kwargs)¶
Force a NumPy array to be 2D and evaluate the function
f
with it.
- compute_jacobian_inverse(data, *args, **kwargs)¶
Force a NumPy array to be 2D and evaluate the function
f
with it.
- 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
f
with it.
- transform(data, *args, **kwargs)¶
Force a NumPy array to be 2D and evaluate the function
f
with it.