ezyrb.reduction.pod_ae.PODAE

class PODAE(pod, ae)[source]

Feed-Forward AutoEncoder class with POD (AE)

Perform the Proper Orthogonal Decomposition.

Parameters:
  • method ({'svd', 'randomized_svd', 'correlation_matrix'}) – the implementation to use for the computation of the POD modes. Default is ‘svd’.

  • rank (int or float) – the rank for the truncation; If 0, the method computes the optimal rank and uses it for truncation; if positive interger, the method uses the argument for the truncation; if float between 0 and 1, the rank is the number of the biggest singular values that are needed to reach the ‘energy’ specified by svd_rank; if -1, the method does not compute truncation. Default is 0. The rank parameter is available using all the available methods.

  • subspace_iteration (int) – the number of subspace iteration in the randomized svd. It is available only using the ‘randomized_svd’ method. Default value is 1.

  • omega_rank (int) – the number of columns of the Omega random matrix. If set to 0, the number of columns is equal to twice the rank (if it has explicitly passed as integer) or twice the number of input snapshots. Default value is 0. It is available only using the ‘randomized_svd’ method.

  • save_memory (bool) – reduce the usage of the memory, despite an higher number of operations. It is available only using the ‘correlation_matrix’ method. Default value is False.

Example:
>>> pod = POD().fit(snapshots)
>>> reduced_snapshots = pod.reduce(snapshots)
>>> # Other possible constructors are ...
>>> pod = POD('svd')
>>> pod = POD('svd', rank=20)
>>> pod = POD('randomized_svd', rank=-1)
>>> pod = POD('randomized_svd', rank=0, subspace_iteration=3,
              omega_rank=10)
>>> pod = POD('correlation_matrix', rank=10, save_memory=False)
__init__(pod, ae)[source]

Perform the Proper Orthogonal Decomposition.

Parameters:
  • method ({'svd', 'randomized_svd', 'correlation_matrix'}) – the implementation to use for the computation of the POD modes. Default is ‘svd’.

  • rank (int or float) – the rank for the truncation; If 0, the method computes the optimal rank and uses it for truncation; if positive interger, the method uses the argument for the truncation; if float between 0 and 1, the rank is the number of the biggest singular values that are needed to reach the ‘energy’ specified by svd_rank; if -1, the method does not compute truncation. Default is 0. The rank parameter is available using all the available methods.

  • subspace_iteration (int) – the number of subspace iteration in the randomized svd. It is available only using the ‘randomized_svd’ method. Default value is 1.

  • omega_rank (int) – the number of columns of the Omega random matrix. If set to 0, the number of columns is equal to twice the rank (if it has explicitly passed as integer) or twice the number of input snapshots. Default value is 0. It is available only using the ‘randomized_svd’ method.

  • save_memory (bool) – reduce the usage of the memory, despite an higher number of operations. It is available only using the ‘correlation_matrix’ method. Default value is False.

Example:
>>> pod = POD().fit(snapshots)
>>> reduced_snapshots = pod.reduce(snapshots)
>>> # Other possible constructors are ...
>>> pod = POD('svd')
>>> pod = POD('svd', rank=20)
>>> pod = POD('randomized_svd', rank=-1)
>>> pod = POD('randomized_svd', rank=0, subspace_iteration=3,
              omega_rank=10)
>>> pod = POD('correlation_matrix', rank=10, save_memory=False)

Methods

__init__(pod, ae)

Perform the Proper Orthogonal Decomposition.

expand(g)

Projects a reduced to full order solution.

fit(X)

inverse_transform(g)

Projects a reduced to full order solution.

predict(new_point)

Evaluate the ANN at given 'new_points'.

reduce(X)

Reduces the given snapshots.

transform(X)

Reduces the given snapshots.

Attributes

modes

The POD modes.

singular_values

The singular values