KerMor
0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
|
Provides kernel interpolation. More...
Provides kernel interpolation.
The basic interpolation form is
\[ f(x) = \sum\limits_{i=1}^N \alpha_i \K(x,x_i)\]
Interpolation finds coefficients such that \(fx_i = RHS(x_i)\) for \(i=1\ldots N\).
There is also a zero-function threshold \(10*eps\). If all \(fx_i-\beta\) values are below that a constant function is assumed.
The preconditioning technique is implemented after [9].
Definition at line 19 of file KernelInterpol.m.
Public Member Functions | |
KernelInterpol () | |
function copy = | clone () |
function [
matrix< double > ai , matrix < double > nbase , usedcenteridx ] = | interpolate (fxi) |
Computes the kernel expansion coefficients \(\alpha_i\). More... | |
function | init (kernels.KernelExpansion kexp) |
% IKernelCoeffComp interface members Initializes the interpolation More... | |
function [
rowvec ci ,
integer svidx , sf ] = | computeKernelCoefficients (rowvec< double > fxi, unused1) |
Implementation of the kernels.ICoeffComp interface. More... | |
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 Member Functions inherited from IKernelCoeffComp | |
function copy = | clone (copy) |
The interface method with returns a copy of the current class instance. More... | |
virtual function | init (data.FileMatrix K) |
Initialization template method. More... | |
virtual function [ rowvec ci , integer svidx ] = | computeKernelCoefficients (yi, initialai) |
Kernel coefficient computation. More... | |
Static Public Member Functions | |
static function | test_KernelInterpolation () |
Performs a test of this class. More... | |
static function | test_KernelInterpolationError () |
Public Attributes | |
logical | UseNewtonBasis = true |
Flag that indicates whether to apply the Newton basis for stable interpolation [7] . Using this interpolation scheme also allows to control the interpolation precision via setting RelTol. More... | |
double | RelTol = 1e-13 |
Maximum relative error tolerance (L2 in function dimension) over the given training data. Only relevant when UseNewtonBasis = true. This setting causes the iterative Newton algorithm to stop as soon as the maximum relative error over the training data is less than RelTol, e.g. ensures an interpolation on the training data up to the specified precision. 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... | |
Public Attributes inherited from IKernelCoeffComp | |
logical | MultiTargetComputation = false |
A flag that indicates to users if the coefficient computation method is capable of using a matrix of column fxi vectors or only single vectors. More... | |
Additional Inherited Members | |
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 inherited from DPCMObject | |
static function obj = | loadobj (obj, from) |
Re-register any registered change listeners! More... | |
static function obj = | loadobj (obj, from) |
general.interpolation.KernelInterpol.KernelInterpol | ( | ) |
Definition at line 145 of file KernelInterpol.m.
References KerMorObject.KerMorObject(), IKernelCoeffComp.MultiTargetComputation, and DPCMObject.registerProps().
function copy = general.interpolation.KernelInterpol.clone | ( | ) |
Definition at line 152 of file KernelInterpol.m.
References UseNewtonBasis.
function [ rowvec ci , integer svidx , sf ] = general.interpolation.KernelInterpol.computeKernelCoefficients | ( | rowvec< double > | fxi, |
unused1 | |||
) |
Implementation of the kernels.ICoeffComp interface.
fxi | The target values \(\vf(\vx_i)\) as row vector |
unused1 | Marked as "~" in original m-file. |
ci | The coefficients \(c_i\) as row vector |
svidx | The support vector indices of all elements of \(c_i\) that regarded to be support vectors. |
Definition at line 235 of file KernelInterpol.m.
References interpolate(), StopFlag.SUCCESS, and UseNewtonBasis.
function general.interpolation.KernelInterpol.init | ( | kernels.KernelExpansion | kexp | ) |
% IKernelCoeffComp interface members Initializes the interpolation
kexp | The kernel expansion |
Definition at line 215 of file KernelInterpol.m.
References UseNewtonBasis.
function [ matrix< double > ai , matrix< double > nbase , usedcenteridx ] = general.interpolation.KernelInterpol.interpolate | ( | fxi | ) |
Computes the kernel expansion coefficients \(\alpha_i\).
fxi | The real function value samples at centers \(x_i\) |
ai | The coefficient vector \(\alpha\) |
nbase | The newton basis values to set for kernels.KernelExpansion.Base |
usedcenteridx | The indices of the used centers. |
Definition at line 161 of file KernelInterpol.m.
References Norm.L2(), RelTol, handle.sort, t, and UseNewtonBasis.
Referenced by computeKernelCoefficients().
|
static |
|
static |
Definition at line 331 of file KernelInterpol.m.
References PlotManager.LeaveOpen.
general.interpolation.KernelInterpol.RelTol = 1e-13 |
Maximum relative error tolerance (L2 in function dimension) over the given training data. Only relevant when UseNewtonBasis = true. This setting causes the iterative Newton algorithm to stop as soon as the maximum relative error over the training data is less than RelTol, e.g. ensures an interpolation on the training data up to the specified precision.
This is useful in particular, if the training data is highly/almost redundant and the direct inversion is too numericall ill conditioned.
Default: 1e-13
SetObservable
set to true. Definition at line 91 of file KernelInterpol.m.
Referenced by interpolate().
general.interpolation.KernelInterpol.UseNewtonBasis = true |
Flag that indicates whether to apply the Newton basis for stable interpolation [7] . Using this interpolation scheme also allows to control the interpolation precision via setting RelTol.
Default: true
SetObservable
set to true. Definition at line 71 of file KernelInterpol.m.
Referenced by clone(), computeKernelCoefficients(), init(), and interpolate().