klsvd module¶
The Karhunen-Loève SVD algorithm to reduce the dimension of a variable.
The KLSVD
class wraps the KarhunenLoeveSVDAlgorithm
from OpenTURNS.
Classes:
|
The Karhunen-Loève SVD Algorithm. |
- class gemseo.mlearning.transform.dimension_reduction.klsvd.KLSVD(mesh, n_components=5, name='KLSVD')[source]¶
Bases:
gemseo.mlearning.transform.dimension_reduction.dimension_reduction.DimensionReduction
The Karhunen-Loève SVD Algorithm.
- name¶
The name of the transformer.
- Type
str
- parameters¶
The parameters of the transformer.
- Type
str
- Parameters
mesh (ndarray) – A mesh passed a 2D array whose rows are nodes and columns are the dimensions of the nodes.
n_components (int) –
By default it is set to 5.
name (str) –
By default it is set to KLSVD.
- Return type
None
Attributes:
The principal components.
The eigen values.
The mesh.
The number of components.
The dimension of the latent space.
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, *args)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 = False¶
- property components¶
The principal components.
- compute_jacobian(data)¶
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)¶
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
- property eigenvalues¶
The eigen values.
- fit(data, *args)[source]¶
Fit the transformer to the data.
- Parameters
data (numpy.ndarray) – The data to be fitted.
*args (Union[float, int, str]) –
- 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 mesh¶
The mesh.
- property n_components¶
The number of components.
- property output_dimension¶
The dimension of the latent space.