gemseo / mlearning / transform / dimension_reduction

klsvd module

The Karhunen-Loève SVD algorithm to reduce the dimension of a variable.

The KLSVD class wraps the KarhunenLoeveSVDAlgorithm from OpenTURNS.

Classes:

KLSVD(mesh[, n_components, name])

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:

CROSSED

components

The principal components.

eigenvalues

The eigen values.

mesh

The mesh.

n_components

The number of components.

output_dimension

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()

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

gemseo.mlearning.transform.transformer.Transformer

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.

transform(data)[source]

Transform the data.

Parameters

data (numpy.ndarray) – The data to be transformed.

Returns

The transformed data.

Return type

numpy.ndarray