ezyrb.reducedordermodel.ReducedOrderModel

class ReducedOrderModel(database, reduction, approximation, plugins=None)[source]

Reduced Order Model class.

This class performs the actual reduced order model using the selected methods for approximation and reduction.

Parameters:
  • database (ezyrb.Database) – the database to use for training the reduced order model.

  • reduction (ezyrb.Reduction) – the reduction method to use in reduced order model.

  • approximation (ezyrb.Approximation) – the approximation method to use in reduced order model.

  • plugins (list) – list of plugins to use in the reduced order model.

Variables:
  • database (ezyrb.Database) – the database used for training the reduced order model.

  • reduction (ezyrb.Reduction) – the reduction method used in reduced order model.

  • approximation (ezyrb.Approximation) – the approximation method used in reduced order model.

  • plugins (list) – list of plugins used in the reduced order model.

Example:
>>> from ezyrb import ReducedOrderModel as ROM
>>> from ezyrb import POD, RBF, Database
>>> pod = POD()
>>> rbf = RBF()
>>> # param, snapshots and new_param are assumed to be declared
>>> db = Database(param, snapshots)
>>> rom = ROM(db, pod, rbf).fit()
>>> rom.predict(new_param)
__init__(database, reduction, approximation, plugins=None)[source]

Methods

__init__(database, reduction, approximation)

clean()

fit()

Calculate reduced space

fit_approximation()

fit_reduction()

kfold_cv_error(n_splits, *args[, norm])

Split the database into k consecutive folds (no shuffling by default).

load(fname)

Load the object from fname using the pickle module.

loo_error(*args[, norm])

Estimate the approximation error using leave-one-out strategy.

optimal_mu([error, k])

Return the parametric points where new high-fidelity solutions have to be computed in order to globally reduce the estimated error.

predict(parameters)

Calculate predicted solution for given parameters.

save(fname[, save_db, save_reduction, ...])

Save the object to fname using the pickle module.

test_error(test[, norm])

Compute the mean norm of the relative error vectors of predicted test snapshots.

Attributes

approximation

database

n_approximation

n_database

n_reduction

reduction