KerMor  0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EstimatorAnalyzer Class Reference

Analysis class for the error estimators. More...

Detailed Description

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.

Author
Daniel Wirtz
Date
2010-08-01
Change in 0.6:
(Daniel Wirtz, 2012-06-08) Adopted to new settings for the DEIM error estimator.
Change in 0.6:
(Daniel Wirtz, 2011-12-05) Moved this class from the demos/EstimatorDemo to EstimatorAnalyzer
Change in 0.4:
(Daniel Wirtz, 2011-05-20) Adopted to the new strategy pattern implemented for the LocalLipschitzFcn inside the LocalLipschitzErrorEstimator (now having a class instead of a function handle).

This class is part of the framework

KerMor - Model Order Reduction using Kernels

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...
 

Constructor & Destructor Documentation

EstimatorAnalyzer.EstimatorAnalyzer ( models.BaseFullModel  model)

Definition at line 227 of file EstimatorAnalyzer.m.

References ModelData, and setModel().

Here is the call graph for this function:

Member Function Documentation

function [ errs , relerrs , ctimes , double t , PlotManager pm ] = EstimatorAnalyzer.compute ( colvec  mu,
integer  inidx,
PlotManager  pm 
)

Runs the demo with the current settings.

Parameters
muThe parameter \(\mu\) to use
inidxThe input index \(i\) of the input function \(u_i\) to use
pmAn optional PlotManager instance to pass to the plot-creating functions Default: []
Generated fields of t:

Definition at line 279 of file EstimatorAnalyzer.m.

References createPlots(), getErrorEstimates(), getResultTable(), Model, ModelData, models.BaseModel.Name, SaveTexTables, and t.

Here is the call graph for this function:

function pm = EstimatorAnalyzer.createPlots (   errs,
  relerrs,
  ctimes,
  pm 
)

Definition at line 401 of file EstimatorAnalyzer.m.

References plotCTimes(), plotErrors(), and plotRelativeErrors().

Referenced by compute().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

function relerrs = EstimatorAnalyzer.getRelativeErrorEstimates (   errs,
colvec< double mu,
  inidx 
)

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

function EstimatorAnalyzer.setModel ( models.BaseFullModel  model)

Sets the model to use for the estimator demo.

Parameters
modelA KerMor full model
Required fields of 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().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

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]"

Note
This property has custom functionality when its value is changed.

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]"

Note
This property has custom functionality when its value is changed.

Definition at line 80 of file EstimatorAnalyzer.m.

EstimatorAnalyzer.LineWidth = 2

The line width to use.


Default: 2

Definition at line 169 of file EstimatorAnalyzer.m.

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.ModelData

A struct with fields Name, ErrsT, RelErrsT that contains information about the estimations of the different error estimators.

Note
This property has non-standard access specifiers: SetAccess = Private, GetAccess = Public
Matlab documentation of property attributes.

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().


The documentation for this class was generated from the following file: