KerMor
0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
|
ABase: Base class for any approximation generation algorithms for kernel expansions,. More...
ABase: Base class for any approximation generation algorithms for kernel expansions,.
xi,ti,mui
parameters.false
for the UsefScaling property; recent experiments suggested true
might not be a wise default value but an extra source of errors.This 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 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< double > | 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. More... | |
matrix< double > | 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. More... | |
matrix< double > | 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. More... | |
matrix< double > | 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. More... | |
matrix< integer > | StopFlags = "[]" |
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... | |
approx.algorithms.ABase.ABase | ( | ) |
Definition at line 232 of file ABase.m.
References KerMorObject.KerMorObject(), and DPCMObject.registerProps().
|
virtual |
The interface method with returns a copy of the current class instance.
target | If 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.
function kernels.KernelExpansionkexp = approx.algorithms.ABase.computeApproximation | ( | data.ApproxTrainData | atd, |
avd | |||
) |
Definition at line 256 of file ABase.m.
References ExpConfig, data.ApproxTrainData.fxi, data.FileMatrix.getColBoundingBox(), kernels.config.ExpansionConfig.getNumConfigurations(), LastCompTime, ScalingG, templateComputeApproximation(), data.ABlockedData.toMemoryMatrix(), and UsefScaling.
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().
|
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.
kexp | The kernel expansion |
atd | The approximation training data |
val | The maximum error \(\max ||f(x_i,t_i,\mu_i) - \hat{f}(x_i,t_i,\mu_i)||_{\{2,\infty\}}\) |
idx | The index of the maximum error inside the errs vector |
errs | A row vector of the errors for each sample |
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().
function nc = approx.algorithms.ABase.getTotalNumConfigurations | ( | ) |
Definition at line 398 of file ABase.m.
References ExpConfig, IClassConfig.getNumConfigurations(), and kernels.config.ExpansionConfig.StateConfig.
|
staticprotected |
Definition at line 451 of file ABase.m.
References ErrorFun, ExpConfig, KerMorObject.KerMorObject(), LastCompTime, MaxErrors, MaxRelErrors, StopFlags, UsefScaling, ValidationErrors, and ValidationRelErrors.
|
virtual |
Implements IReductionSummaryPlotProvider.
Definition at line 356 of file ABase.m.
References BestExpConfig, ExpConfig, MaxErrors, MaxRelErrors, t, ValidationErrors, and ValidationRelErrors.
|
protectedpure virtual |
Performs the actual approximation after scaling.
Template method.
kexp | A kernel expansion. |
atd | The approximation training data. |
Referenced by computeApproximation().
approx.algorithms.ABase.BestExpConfig |
Index of the best expansion config determined by the algorithm.
Definition at line 201 of file ABase.m.
Referenced by clone(), approx.algorithms.Componentwise.collectFromExpConfigSplit(), getApproximationSummary(), plotSummary(), approx.algorithms.VKOGA.startAdaptiveExtension(), and approx.algorithms.Componentwise.templateComputeApproximation().
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.
Default: Norm.L2
SetObservable
set to true. Definition at line 87 of file ABase.m.
Referenced by clone(), getError(), loadobj(), and approx.algorithms.VKOGA.startAdaptiveExtension().
approx.algorithms.ABase.ExpConfig = "[]" |
The different kernel expansion configurations to try.
Default: []
SetObservable
set to true. Definition at line 55 of file ABase.m.
Referenced by clone(), approx.algorithms.Componentwise.collectFromExpConfigSplit(), computeApproximation(), getApproximationSummary(), getTotalNumConfigurations(), loadobj(), approx.algorithms.Componentwise.plotSummary(), plotSummary(), approx.algorithms.VKOGA.startAdaptiveExtension(), approx.algorithms.AAdaptiveBase.templateComputeApproximation(), and approx.algorithms.Componentwise.templateComputeApproximation().
approx.algorithms.ABase.LastCompTime = "[]" |
The computation time for the last run in seconds.
Default: []
SetAccess = Protected, GetAccess = Public
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: []
SetAccess = Protected, GetAccess = Public
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: []
SetAccess = Protected, GetAccess = Public
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().
|
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.
SetAccess = Private, GetAccess = Protected
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: []
SetAccess = Protected, GetAccess = Public
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.
Default: false
SetObservable
set to true. 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: []
SetAccess = Protected, GetAccess = Public
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: []
SetAccess = Protected, GetAccess = Public
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().