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
approx.algorithms.ABase Class Referenceabstract

ABase: Base class for any approximation generation algorithms for kernel expansions,. More...

Detailed Description

ABase: Base class for any approximation generation algorithms for kernel expansions,.

Author
Daniel Wirtz
Date
2011-07-07
Change in 0.5:
(Daniel Wirtz, 2011-11-02)
  • New interface for approximation computation: Passing an data.ApproxTrainData instance now instead of xi,ti,mui parameters.
  • New default value false for the UsefScaling property; recent experiments suggested true might not be a wise default value but an extra source of errors.
Change in 0.5:
(Daniel Wirtz, 2011-10-14) Improved the parallel computation of kernel expansion coefficients.
Change in 0.5:
(Daniel Wirtz, 2011-09-12) Added initial values that can be passed to the CoeffComp algorithms. Now computing coefficients at once if MultiTargetComputation of the CoeffComp property is true.
New in 0.5:
(Daniel Wirtz, 2011-07-07) Added this class.

This class is part of the framework

KerMor - Model Order Reduction using Kernels

Definition at line 19 of file ABase.m.

Public Member Functions

 ABase ()
 
function copy = clone (copy)
 The interface method with returns a copy of the current class instance. More...
 
function kernels.KernelExpansion
kexp = 
computeApproximation (data.ApproxTrainData atd, avd)
 
function [ str ,

rangetab ] = 
getApproximationSummary ()
 Setup. More...
 
function  plotSummary (pm, context)
 
function nc = getTotalNumConfigurations ()
 
- Public Member Functions inherited from KerMorObject
 KerMorObject ()
 Constructs a new KerMor object. More...
 
function  display ()
 disp(object2str(this)); More...
 
function bool = eq (B)
 Checks equality of two KerMor objects. More...
 
function bool = ne (B)
 Checks if two KerMorObjects are different. More...
 
function cn = getClassName ()
 Returns the simple class name of this object without packages. More...
 
- Public Member Functions inherited from DPCMObject
 DPCMObject ()
 Creates a new DPCM object. More...
 
 DPCMObject ()
 

Public Attributes

kernels.config.ExpansionConfig ExpConfig = "[]"
 The different kernel expansion configurations to try. More...
 
 UsefScaling = false
 Flag that determines whether the approximation center f values should be scaled to [-1,1] before the approximation is computed. More...
 
function_handle ErrorFun = @Norm.L2
 The error function to apply on each data vector. More...
 
double LastCompTime = "[]"
 The computation time for the last run in seconds. More...
 
matrix< doubleMaxErrors = "[]"
 For each configuration, contains a row with the maximum errors on the training data. The number of columns depends on the type of algorithm implemented by the subclasses. More...
 
matrix< doubleMaxRelErrors = "[]"
 For each configuration, contains a row with the maximum relative errors on the training data. The number of columns depends on the type of algorithm implemented by the subclasses. More...
 
matrix< doubleValidationErrors = "[]"
 For each configuration, contains a row with the maximum errors on the validation data. The number of columns depends on the type of algorithm implemented by the subclasses. More...
 
matrix< doubleValidationRelErrors = "[]"
 For each configuration, contains a row with the maximum relative errors on the validation data. The number of columns depends on the type of algorithm implemented by the subclasses. More...
 
matrix< integerStopFlags = "[]"
 For each effective configuration, the stop flags are stored here. More...
 
integer BestExpConfig
 Index of the best expansion config determined by the algorithm. More...
 
- Public Attributes inherited from DPCMObject
 WorkspaceVariableName = ""
 The workspace variable name of this class. Optional. More...
 
 ID = "[]"
 An ID that allows to uniquely identify this DPCMObject (at least within the current MatLab session/context). More...
 
 PropertiesChanged = "[]"
 The Dictionary containing all the property settings as key/value pairs. 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...
 

Protected Member Functions

function [ double val ,
integer idx ,
rowvec errs ] = 
getError (kernels.KernelExpansion kexp,data.ApproxTrainData atd)
 Computes the error according to the chosen error function (see ErrorFun property) with respect to the current kernel expansion and the \(f(x_i)\) values in the training data. More...
 
virtual function  templateComputeApproximation (kernels.KernelExpansion kexp,data.ApproxTrainData atd, avd)
 Performs the actual approximation after scaling. More...
 
- Protected Member Functions inherited from KerMorObject
function  checkType (obj, type)
 Object typechecker. More...
 
- Protected Member Functions inherited from DPCMObject
function  registerProps (varargin)
 Call this method at any class that defines DPCM observed properties. More...
 
function  registerProps (varargin)
 

Static Protected Member Functions

static function this = loadobj (this, initfrom)
 
- Static Protected Member Functions inherited from DPCMObject
static function obj = loadobj (obj, from)
 Re-register any registered change listeners! More...
 
static function obj = loadobj (obj, from)
 

Protected Attributes

 ScalingG
 If UsefScaling is set to true, this matrix contains the scaling matrix which has to be used in sub-algorithms in order to compute the correct approximation error on training data. More...
 

Constructor & Destructor Documentation

approx.algorithms.ABase.ABase ( )

Definition at line 232 of file ABase.m.

References KerMorObject.KerMorObject(), and DPCMObject.registerProps().

Here is the call graph for this function:

Member Function Documentation

function copy = approx.algorithms.ABase.clone (   target)
virtual

The interface method with returns a copy of the current class instance.

Parameters
targetIf clone was called for a subclass of this class, target must contain the new instance of the subclass that is to be the cloned result.

Implements ICloneable.

Definition at line 239 of file ABase.m.

References BestExpConfig, kernels.config.ExpansionConfig.clone(), ErrorFun, ExpConfig, LastCompTime, MaxErrors, MaxRelErrors, ScalingG, StopFlags, UsefScaling, ValidationErrors, and ValidationRelErrors.

Here is the call graph for this function:

function kernels.KernelExpansionkexp = approx.algorithms.ABase.computeApproximation ( data.ApproxTrainData  atd,
  avd 
)
function [ str , rangetab ] = approx.algorithms.ABase.getApproximationSummary ( )

Setup.

Definition at line 329 of file ABase.m.

References BestExpConfig, handle.disp, ExpConfig, IClassConfig.getValueRanges(), and object2str().

Here is the call graph for this function:

function [ double val , integer idx , rowvec errs ] = approx.algorithms.ABase.getError ( kernels.KernelExpansion  kexp,
data.ApproxTrainData  atd 
)
protected

Computes the error according to the chosen error function (see ErrorFun property) with respect to the current kernel expansion and the \(f(x_i)\) values in the training data.

See Also
ErrorFun
Parameters
kexpThe kernel expansion
atdThe approximation training data
Return values
valThe maximum error \(\max ||f(x_i,t_i,\mu_i) - \hat{f}(x_i,t_i,\mu_i)||_{\{2,\infty\}}\)
idxThe index of the maximum error inside the errs vector
errsA row vector of the errors for each sample
Required fields of atd:
Required fields of kexp:

Definition at line 408 of file ABase.m.

References ErrorFun, kernels.KernelExpansion.evaluate(), data.ApproxTrainData.fxi, data.ApproxTrainData.mui, ScalingG, data.ApproxTrainData.ti, and data.ApproxTrainData.xi.

Referenced by approx.algorithms.Componentwise.templateComputeApproximation().

Here is the call graph for this function:

Here is the caller graph for this function:

function nc = approx.algorithms.ABase.getTotalNumConfigurations ( )

Definition at line 398 of file ABase.m.

References ExpConfig, IClassConfig.getNumConfigurations(), and kernels.config.ExpansionConfig.StateConfig.

Here is the call graph for this function:

static function this = approx.algorithms.ABase.loadobj (   this,
  initfrom 
)
staticprotected

Definition at line 451 of file ABase.m.

References ErrorFun, ExpConfig, KerMorObject.KerMorObject(), LastCompTime, MaxErrors, MaxRelErrors, StopFlags, UsefScaling, ValidationErrors, and ValidationRelErrors.

Here is the call graph for this function:

function approx.algorithms.ABase.plotSummary (   pm,
  context 
)
virtual
function approx.algorithms.ABase.templateComputeApproximation ( kernels.KernelExpansion  kexp,
data.ApproxTrainData  atd,
  avd 
)
protectedpure virtual

Performs the actual approximation after scaling.

Template method.

Parameters
kexpA kernel expansion.
atdThe approximation training data.

Referenced by computeApproximation().

Here is the caller graph for this function:

Member Data Documentation

approx.algorithms.ABase.BestExpConfig
approx.algorithms.ABase.ErrorFun = @Norm.L2

The error function to apply on each data vector.

Must be a function_handle that takes one matrix argument. The result is computed along the first dimension, i.e. the return value has the same number of columns than the input matrix.

Property class important:
Depending on the approximation goal different error functions are suitable.

Default: Norm.L2

See Also
Norm
Note
This property has the MATLAB attribute SetObservable set to true.
Matlab documentation of property attributes.

Definition at line 87 of file ABase.m.

Referenced by clone(), getError(), loadobj(), and approx.algorithms.VKOGA.startAdaptiveExtension().

approx.algorithms.ABase.ExpConfig = "[]"
approx.algorithms.ABase.LastCompTime = "[]"

The computation time for the last run in seconds.

Default: []

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

Definition at line 111 of file ABase.m.

Referenced by clone(), approx.algorithms.Componentwise.collectFromExpConfigSplit(), computeApproximation(), and loadobj().

approx.algorithms.ABase.MaxErrors = "[]"

For each configuration, contains a row with the maximum errors on the training data. The number of columns depends on the type of algorithm implemented by the subclasses.

Default: []

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

Definition at line 124 of file ABase.m.

Referenced by clone(), approx.algorithms.Componentwise.collectFromExpConfigSplit(), approx.algorithms.VKOGA.loadobj(), loadobj(), approx.algorithms.Componentwise.plotSummary(), plotSummary(), approx.algorithms.VKOGA.startAdaptiveExtension(), approx.algorithms.AAdaptiveBase.templateComputeApproximation(), and approx.algorithms.Componentwise.templateComputeApproximation().

approx.algorithms.ABase.MaxRelErrors = "[]"

For each configuration, contains a row with the maximum relative errors on the training data. The number of columns depends on the type of algorithm implemented by the subclasses.

Default: []

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

Definition at line 139 of file ABase.m.

Referenced by approx.algorithms.VKOGA.clone(), clone(), approx.algorithms.Componentwise.collectFromExpConfigSplit(), loadobj(), approx.algorithms.Componentwise.plotSummary(), plotSummary(), approx.algorithms.VKOGA.startAdaptiveExtension(), approx.algorithms.AAdaptiveBase.templateComputeApproximation(), and approx.algorithms.Componentwise.templateComputeApproximation().

approx.algorithms.ABase.ScalingG
protected

If UsefScaling is set to true, this matrix contains the scaling matrix which has to be used in sub-algorithms in order to compute the correct approximation error on training data.

This is automatically done upon calls to ABase.getError.

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

Definition at line 213 of file ABase.m.

Referenced by clone(), computeApproximation(), and getError().

approx.algorithms.ABase.StopFlags = "[]"

For each effective configuration, the stop flags are stored here.

Default: []

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

Definition at line 184 of file ABase.m.

Referenced by clone(), approx.algorithms.Componentwise.collectFromExpConfigSplit(), approx.algorithms.VKOGA.loadobj(), loadobj(), approx.algorithms.VKOGA.startAdaptiveExtension(), and approx.algorithms.Componentwise.templateComputeApproximation().

approx.algorithms.ABase.UsefScaling = false

Flag that determines whether the approximation center f values should be scaled to [-1,1] before the approximation is computed.

Property class optional:
This option makes sense when using univariate rotation-invariant kernels as different dimensions might have different scales

Default: false

Note
This property has the MATLAB attribute SetObservable set to true.
Matlab documentation of property attributes.

Definition at line 70 of file ABase.m.

Referenced by clone(), computeApproximation(), and loadobj().

approx.algorithms.ABase.ValidationErrors = "[]"

For each configuration, contains a row with the maximum errors on the validation data. The number of columns depends on the type of algorithm implemented by the subclasses.

Default: []

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

Definition at line 154 of file ABase.m.

Referenced by clone(), approx.algorithms.Componentwise.collectFromExpConfigSplit(), loadobj(), approx.algorithms.Componentwise.plotSummary(), plotSummary(), approx.algorithms.VKOGA.startAdaptiveExtension(), approx.algorithms.AAdaptiveBase.templateComputeApproximation(), and approx.algorithms.Componentwise.templateComputeApproximation().

approx.algorithms.ABase.ValidationRelErrors = "[]"

For each configuration, contains a row with the maximum relative errors on the validation data. The number of columns depends on the type of algorithm implemented by the subclasses.

Default: []

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

Definition at line 169 of file ABase.m.

Referenced by clone(), approx.algorithms.Componentwise.collectFromExpConfigSplit(), loadobj(), approx.algorithms.Componentwise.plotSummary(), plotSummary(), approx.algorithms.VKOGA.startAdaptiveExtension(), approx.algorithms.AAdaptiveBase.templateComputeApproximation(), and approx.algorithms.Componentwise.templateComputeApproximation().


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