KerMor
0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
|
Analysis class for the error estimators. More...
Analysis class for the error estimators.
The constructor either takes an existing model and uses this for the error estimator analysis or the input argument is a dimension number for the standard model used.
demos/EstimatorDemo
to EstimatorAnalyzerThis class is part of the framework
Homepage
http://www.morepas.org/software/index.htmlDocumentation
http://www.morepas.org/software/kermor/index.htmlLicense
KerMor license conditions Definition at line 17 of file EstimatorAnalyzer.m.
Public Member Functions | |
EstimatorAnalyzer (models.BaseFullModel model) | |
function | setModel (models.BaseFullModel model) |
Sets the model to use for the estimator demo. More... | |
function est = | getDefaultEstStruct () |
Returns the default structure for the Est property of this class. Contains only the error.DefaultEstimator class labeled True error . More... | |
function [
errs , relerrs , ctimes , double t , PlotManager pm ] = | compute (colvec mu,integer inidx,PlotManager pm) |
Runs the demo with the current settings. More... | |
function [
errs , ctimes , varargout ] = | getErrorEstimates (colvec< double > mu, inidx, withrel) |
function
relerrs = | getRelativeErrorEstimates (errs,colvec< double > mu, inidx) |
function pm = | createPlots (errs, relerrs, ctimes, pm) |
function | plotErrors (errs, pm) |
function | plotRelativeErrors (relerrs, pm) |
function | plotCTimes (errs, ctimes, pm) |
function pt = | getResultTable (errs, ctimes) |
function ts = | createStatsTables (sort) |
Creates LaTeX tables with each the Errors ,Relative errors ,Overestimations and Computation times for the demos started since creation of the EstimatorAnalyzer. More... | |
Public Attributes | |
models.BaseFullModel | Model |
The used model. More... | |
models.ReducedModel | ReducedModel |
The reduced model. More... | |
rowvec | EstimatorIterations = "[1 2]" |
How many estimator iterations should be performed? More... | |
rowvec | EstimatorVersions = "[1 1 0 0 1 0 0 1]" |
Chooses the estimator versions. Set to 1 for use, 0 for not use. 1: True Error 2: GLE, Global Lipschitz estimator. 3: LGL, Local Gradient Lipschitz 4: LSL, Local Secant Lipschitz 5: ILSL, Improved Local Secant Lipschitz 6: LGL TD, Time Discrete Local Gradient Lipschitz 7: LSL TD, Time Discrete Local Secant Lipschitz 8: ILSL TD, Time Discrete Improved Local Secant Lipschitz. More... | |
logical | LogarithmicPlot = true |
Determines whether to plot the errors on a logarithmic scale or not. More... | |
char | SaveTexTables = "tables.tex" |
Flag whether to save the time results as a LaTeX-Table into a text file. More... | |
logical | SortResultTable = false |
Set flag to sort the resulting computation time and estimates table by the product of comp-time and error estimate. More... | |
logical | UseOutputError = true |
Flag wether to use the output errors or state variable errors. More... | |
MarkerSize = 8 | |
The marker size for error and relative errors plots. More... | |
NumMarkers = 5 | |
The number of markers for error and relative errors plots. More... | |
LineWidth = 2 | |
The line width to use. More... | |
ErrorOrders = "[1 2 3 5 10]" | |
% DEIM estimator related stuff The error orders to use. Unset if the JacDEIM/SimTranssizes version should be used. More... | |
struct | Est |
A struct containing information about different error estimators. More... | |
PlotStartIndex = 1 | |
The position where to start plotting error estimates. More... | |
ModelData | |
A struct with fields Name, ErrsT, RelErrsT that contains information about the estimations of the different error estimators. More... | |
Public Attributes inherited from handle | |
addlistener | |
Creates a listener for the specified event and assigns a callback function to execute when the event occurs. More... | |
notify | |
Broadcast a notice that a specific event is occurring on a specified handle object or array of handle objects. More... | |
delete | |
Handle object destructor method that is called when the object's lifecycle ends. More... | |
disp | |
Handle object disp method which is called by the display method. See the MATLAB disp function. More... | |
display | |
Handle object display method called when MATLAB software interprets an expression returning a handle object that is not terminated by a semicolon. See the MATLAB display function. More... | |
findobj | |
Finds objects matching the specified conditions from the input array of handle objects. More... | |
findprop | |
Returns a meta.property objects associated with the specified property name. More... | |
fields | |
Returns a cell array of string containing the names of public properties. More... | |
fieldnames | |
Returns a cell array of string containing the names of public properties. See the MATLAB fieldnames function. More... | |
isvalid | |
Returns a logical array in which elements are true if the corresponding elements in the input array are valid handles. This method is Sealed so you cannot override it in a handle subclass. More... | |
eq | |
Relational functions example. See details for more information. More... | |
transpose | |
Transposes the elements of the handle object array. More... | |
permute | |
Rearranges the dimensions of the handle object array. See the MATLAB permute function. More... | |
reshape | |
hanges the dimensions of the handle object array to the specified dimensions. See the MATLAB reshape function. More... | |
sort | |
ort the handle objects in any array in ascending or descending order. More... | |
EstimatorAnalyzer.EstimatorAnalyzer | ( | models.BaseFullModel | model | ) |
Definition at line 227 of file EstimatorAnalyzer.m.
References ModelData, and setModel().
function [ errs , relerrs , ctimes , double t , PlotManager pm ] = EstimatorAnalyzer.compute | ( | colvec | mu, |
integer | inidx, | ||
PlotManager | pm | ||
) |
Runs the demo with the current settings.
mu | The parameter \(\mu\) to use |
inidx | The input index \(i\) of the input function \(u_i\) to use |
pm | An optional PlotManager instance to pass to the plot-creating functions Default: [] |
Definition at line 279 of file EstimatorAnalyzer.m.
References createPlots(), getErrorEstimates(), getResultTable(), Model, ModelData, models.BaseModel.Name, SaveTexTables, and t.
function pm = EstimatorAnalyzer.createPlots | ( | errs, | |
relerrs, | |||
ctimes, | |||
pm | |||
) |
Definition at line 401 of file EstimatorAnalyzer.m.
References plotCTimes(), plotErrors(), and plotRelativeErrors().
Referenced by compute().
function ts = EstimatorAnalyzer.createStatsTables | ( | sort | ) |
Creates LaTeX tables with each the Errors
,Relative errors
,Overestimations
and Computation times
for the demos started since creation of the EstimatorAnalyzer.
Uses the current model's name and param/input values as identification.
Appends the resulting LaTeX table to the file statsTables.txt
, which is created if not existent.
Definition at line 505 of file EstimatorAnalyzer.m.
References Est, handle.fieldnames, handle.fields, ModelData, handle.sort, and t.
function est = EstimatorAnalyzer.getDefaultEstStruct | ( | ) |
Returns the default structure for the Est property of this class. Contains only the error.DefaultEstimator class labeled True error
.
Definition at line 260 of file EstimatorAnalyzer.m.
References models.ReducedModel.FullModel, and ReducedModel.
function [errs , ctimes , varargout ] = EstimatorAnalyzer.getErrorEstimates | ( | colvec< double > | mu, |
inidx, | |||
withrel | |||
) |
Definition at line 330 of file EstimatorAnalyzer.m.
References models.ReducedModel.ErrorEstimator, Est, getRelativeErrorEstimates(), Model, error.BaseEstimator.OutputError, ReducedModel, models.BaseModel.simulate(), error.BaseEstimator.StateError, models.BaseModel.Times, and UseOutputError.
Referenced by compute().
Definition at line 389 of file EstimatorAnalyzer.m.
References models.BaseFullModel.computeTrajectory(), Model, ReducedModel, models.BaseModel.simulate(), models.BaseFirstOrderSystem.StateScaling, models.BaseModel.System, and UseOutputError.
Referenced by getErrorEstimates().
function pt = EstimatorAnalyzer.getResultTable | ( | errs, | |
ctimes | |||
) |
Definition at line 483 of file EstimatorAnalyzer.m.
References Est, Utils.getLatexStr(), Model, models.BaseModel.Name, handle.sort, SortResultTable, t, and models.BaseModel.T.
Referenced by compute().
function EstimatorAnalyzer.plotCTimes | ( | errs, | |
ctimes, | |||
pm | |||
) |
Definition at line 443 of file EstimatorAnalyzer.m.
References Est, LogarithmicPlot, Model, and models.BaseModel.Name.
Referenced by createPlots().
function EstimatorAnalyzer.plotErrors | ( | errs, | |
pm | |||
) |
Definition at line 421 of file EstimatorAnalyzer.m.
References Model, models.BaseModel.Name, models.BaseModel.T, and models.BaseModel.Times.
Referenced by createPlots().
function EstimatorAnalyzer.plotRelativeErrors | ( | relerrs, | |
pm | |||
) |
Definition at line 431 of file EstimatorAnalyzer.m.
References Model, models.BaseModel.Name, models.BaseModel.T, and models.BaseModel.Times.
Referenced by createPlots().
function EstimatorAnalyzer.setModel | ( | models.BaseFullModel | model | ) |
Sets the model to use for the estimator demo.
model | A KerMor full model |
Definition at line 235 of file EstimatorAnalyzer.m.
References models.BaseFullModel.buildReducedModel(), models.ReducedModel.ErrorEstimator, Model, models.BaseFullModel.offlineGenerations(), and ReducedModel.
Referenced by EstimatorAnalyzer(), and demos.RandomModelEstimatorAnalyzer.setup().
EstimatorAnalyzer.ErrorOrders = "[1 2 3 5 10]" |
% DEIM estimator related stuff The error orders to use. Unset if the JacDEIM/SimTranssizes version should be used.
Default: "[1 2 3 5 10]"
Definition at line 179 of file EstimatorAnalyzer.m.
EstimatorAnalyzer.Est |
A struct containing information about different error estimators.
Definition at line 190 of file EstimatorAnalyzer.m.
Referenced by createStatsTables(), getErrorEstimates(), getResultTable(), and plotCTimes().
EstimatorAnalyzer.EstimatorIterations = "[1 2]" |
How many estimator iterations should be performed?
Is an integer row vector.
Default: "[1 2]"
Definition at line 67 of file EstimatorAnalyzer.m.
Referenced by models.mathmod2012.MathMODExperiment.CreatePlots(), models.iciam2011.ICIAMExperiment.CreatePlots(), models.wh10.WH10Experiment.Experiment1(), models.wh10.WH10Experiment.Experiment2(), models.wh10.WH10Experiment.Experiment3(), models.wh10.WH10Experiment.Experiment4(), models.iciam2011.ICIAMMain(), and models.mathmod2012.MathMODMain().
EstimatorAnalyzer.EstimatorVersions = "[1 1 0 0 1 0 0 1]" |
Chooses the estimator versions. Set to 1 for use, 0 for not use. 1: True Error 2: GLE, Global Lipschitz estimator. 3: LGL, Local Gradient Lipschitz 4: LSL, Local Secant Lipschitz 5: ILSL, Improved Local Secant Lipschitz 6: LGL TD, Time Discrete Local Gradient Lipschitz 7: LSL TD, Time Discrete Local Secant Lipschitz 8: ILSL TD, Time Discrete Improved Local Secant Lipschitz.
Is overridden when DEIM is used in the reduced models, only 1 is considered then.
Default: "[1 1 0 0 1 0 0 1]"
Definition at line 80 of file EstimatorAnalyzer.m.
EstimatorAnalyzer.LineWidth = 2 |
EstimatorAnalyzer.LogarithmicPlot = true |
Determines whether to plot the errors on a logarithmic scale or not.
Default: true
Definition at line 102 of file EstimatorAnalyzer.m.
Referenced by plotCTimes().
EstimatorAnalyzer.MarkerSize = 8 |
The marker size for error and relative errors plots.
Default: 8
Definition at line 151 of file EstimatorAnalyzer.m.
EstimatorAnalyzer.Model |
The used model.
Definition at line 47 of file EstimatorAnalyzer.m.
Referenced by compute(), getErrorEstimates(), getRelativeErrorEstimates(), getResultTable(), demos.RandomModelEstimatorAnalyzer.newCoeffs(), plotCTimes(), plotErrors(), plotRelativeErrors(), demos.RandomModelEstimatorAnalyzer.RandomModelEstimatorAnalyzer(), setModel(), and demos.RandomModelEstimatorAnalyzer.setup().
EstimatorAnalyzer.ModelData |
A struct with fields Name, ErrsT, RelErrsT that contains information about the estimations of the different error estimators.
SetAccess = Private, GetAccess = Public
Definition at line 211 of file EstimatorAnalyzer.m.
Referenced by compute(), createStatsTables(), and EstimatorAnalyzer().
EstimatorAnalyzer.NumMarkers = 5 |
The number of markers for error and relative errors plots.
Default: 5
Definition at line 160 of file EstimatorAnalyzer.m.
EstimatorAnalyzer.PlotStartIndex = 1 |
The position where to start plotting error estimates.
Default: 1
Definition at line 200 of file EstimatorAnalyzer.m.
EstimatorAnalyzer.ReducedModel |
The reduced model.
Definition at line 57 of file EstimatorAnalyzer.m.
Referenced by getDefaultEstStruct(), getErrorEstimates(), getRelativeErrorEstimates(), and setModel().
EstimatorAnalyzer.SaveTexTables = "tables.tex" |
Flag whether to save the time results as a LaTeX-Table into a text file.
Set to [] to disable
Default: "tables.tex"
Definition at line 114 of file EstimatorAnalyzer.m.
Referenced by compute().
EstimatorAnalyzer.SortResultTable = false |
Set flag to sort the resulting computation time and estimates table by the product of comp-time and error estimate.
Default: false
Definition at line 128 of file EstimatorAnalyzer.m.
Referenced by getResultTable().
EstimatorAnalyzer.UseOutputError = true |
Flag wether to use the output errors or state variable errors.
Default: true
Definition at line 140 of file EstimatorAnalyzer.m.
Referenced by getErrorEstimates(), and getRelativeErrorEstimates().