BasisTemplate#

class BasisTemplate(name: str = None)[source]#

Template class for bases.

Classes that inherit from this template must implement the methods fit(), compress(), and decompress().

See PODBasis for an example.

Properties:
full_state_dimension#

Dimension \(n\) of the full state.

name#

Label for the state variable that this basis approximates.

reduced_state_dimension#

Dimension \(r\) of the reduced (compressed) state.

shape#

Dimensions \((n, r)\) of the basis.

Methods:

compress

Map high-dimensional states to low-dimensional latent coordinates.

decompress

Map low-dimensional latent coordinates to high-dimensional states.

fit

Construct the basis.

load

Load a transformer from an HDF5 file.

project

Project a high-dimensional state vector to the subset of the high-dimensional space that can be represented by the basis.

projection_error

Compute the error of the basis representation of a state or states.

save

Save the transformer to an HDF5 file.

verify

Verify that compress() and decompress() are consistent in the sense that the range of decompress() is in the domain of compress() and that project() defines a projection operator, i.e., project(project(Q)) = project(Q).