Latent space projections
dynax.PODLatentSpace
Proper orthogonal decomposition based latent space.
Linear projections to and from a latent space using the right singular vectors from the SVD of snapshots with as modes/basis.
When projecting into the latent space, the input is first shifted (optional), then scaled and finally projected onto the modes. By default, the scaling is computed such that the latent variables of the snapshots used to calculate the modes have standard deviation one.
For the projection into the full order space, the latent variables are first multiplied with the modes, then scaled and finally shifted.
__init__(snapshots, num_modes, shift=None, scaling='normalize')
Initialize the SVD latent space.
Note
After initialization you can still change the number of modes, i.e., the latent space dimension.
| PARAMETER | DESCRIPTION |
|---|---|
snapshots
|
Snapshots of shape
TYPE:
|
num_modes
|
Number of modes to use in the latent space.
TYPE:
|
shift
|
Array or float to shift a snapshot by, before transforming.
By setting
TYPE:
|
scaling
|
Scalar value to scale all latent variables by.
Can be
TYPE:
|
to_latent(snapshot)
Project snapshot into the latent space.
| PARAMETER | DESCRIPTION |
|---|---|
snapshot
|
Data with shape
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Shaped[Array, '... n_modes']
|
Array of latent variables with shape |
from_latent(latent_variables)
Project latent variables into the full order space.
| PARAMETER | DESCRIPTION |
|---|---|
latent_variables
|
Data with shape
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Shaped[Array, '... n_space']
|
Array with shape |