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
general.interpolation.KernelInterpol Class Reference

Provides kernel interpolation. More...

Detailed Description

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

Author
Daniel Wirtz
Date
01.04.2010
Change in 0.7:
(Daniel Wirtz, 2014-01-24) Removed the preconditioning stuff and LU factorization. Instead included the Newton basis computation method from [7] and controllable interpolation precision via RelTol
Change in 0.7:
(Daniel Wirtz, 2013-01-23) Re-added the LU decomposition stuff to this class from MemoryMatrix, as the class has been removed.
New in 0.6:
(Daniel Wirtz, 2012-01-23) Included preconditioning techniques for kernel interpolation according to [9].
Change in 0.5:
(Daniel Wirtz, 2011-09-12) Set the UseLU flag to true per default. Using FileMatrix instances now, along with flags of whether to successively build the inverse, too.
Change in 0.4:
(Daniel Wirtz, 2011-05-03) Removed the artificial offset term \(b\) from the interpolation process (no longer used in kernel expansions)
New in 0.3:
(Daniel Wirtz, 2011-04-21) Integrated this class to the property default value changed supervision system Property classes and levels. This class now inherits from KerMorObject and has an extended constructor registering any user-relevant properties using KerMorObject.registerProps.
Change in 0.2:
(Daniel Wirtz, 2011-03-21)
  • Added the general.interpolation.KernelInterpol.UseLU property. With this subsequent calls to interpolate using the same kernel matrix is more efficient.
  • Updated the documentation

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)
 

Constructor & Destructor Documentation

general.interpolation.KernelInterpol.KernelInterpol ( )

Definition at line 145 of file KernelInterpol.m.

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

Here is the call graph for this function:

Member Function Documentation

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.

Parameters
fxiThe target values \(\vf(\vx_i)\) as row vector
unused1Marked as "~" in original m-file.
Return values
ciThe coefficients \(c_i\) as row vector
svidxThe 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.

Here is the call graph for this function:

function general.interpolation.KernelInterpol.init ( kernels.KernelExpansion  kexp)

% IKernelCoeffComp interface members Initializes the interpolation

Parameters
kexpThe kernel expansion
Required fields of kexp:

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

Parameters
fxiThe real function value samples at centers \(x_i\)
Return values
aiThe coefficient vector \(\alpha\)
nbaseThe newton basis values to set for kernels.KernelExpansion.Base
usedcenteridxThe 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().

Here is the call graph for this function:

Here is the caller graph for this function:

function general.interpolation.KernelInterpol.test_KernelInterpolation ( )
static

Performs a test of this class.

Definition at line 262 of file KernelInterpol.m.

References k.

static function general.interpolation.KernelInterpol.test_KernelInterpolationError ( )
static

Definition at line 331 of file KernelInterpol.m.

References PlotManager.LeaveOpen.

Member Data Documentation

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

Property class important:
Specifying a higher tolerance results in sparser but less precise approximations
See Also
UseNewtonBasis
Note
This property has the MATLAB attribute SetObservable set to true.
Matlab documentation of property attributes.

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.

Property class optional:
This can greatly improve numerical stability of computation, but possibly takes more time to compute.

Default: true

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

Definition at line 71 of file KernelInterpol.m.

Referenced by clone(), computeKernelCoefficients(), init(), and interpolate().


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