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
kernels.ARBFKernel Class Referenceabstract

Abstract class for radial basis function / rotation- and translation invariant kernels. More...

Detailed Description

Abstract class for radial basis function / rotation- and translation invariant kernels.

All rbf kernels have the form \(\K(x,y) := \phi(\noG{x-y}), \vx\in\R^d\) for some real-valued scalar function \(\phi: [0, \infty] \longrightarrow \R\) and a given norm-inducing matrix \(\vG\).

When combinations of Kernels are used, this interface will have to be changed to a property. Up to now, the class CombinationKernel cannot dynamically adopt to the interface for the case that all contained kernels implement this interface.

Author
Daniel Wirtz
Date
2011-08-09
Change in 0.7:
(Daniel Wirtz, 2013-01-16) Moved the Gamma property to here as it is a common setting for all RBF kernels.
New in 0.5:
(Daniel Wirtz, 2011-10-17)
  • Added this class.
  • Implemented the general evaluate function for rotation invariant kernels.

This class is part of the framework

KerMor - Model Order Reduction using Kernels
Todo:
: change property to check for interface implementation, implement in other suitable kernels

Definition at line 18 of file ARBFKernel.m.

Public Member Functions

 ARBFKernel ()
 
function K = evaluate (matrix< double > x,matrix< double > y)
 Evaluates the rotation and translation invariant kernel. More...
 
function bool = eq (B)
 
function copy = clone (copy)
 The interface method with returns a copy of the current class instance. More...
 
function r = getSqDiffNorm (matrix< double > x,matrix< double > y)
 Returns the weighted squared norm \(r\) of the difference \(\noG{x-y}^2/\gamma^2\). More...
 
virtual function phir = evaluateScalar (matrix< double > r)
 Allows the evaluation of the function \(\phi(r)\) for scalar \(r\) directly. More...
 
- Public Member Functions inherited from kernels.BaseKernel
 BaseKernel ()
 
function fcn = getLipschitzFunction ()
 Method that allows error estimators to obtain a lipschitz constant estimation function from this kernel. More...
 
function bool = eq (B)
 Checks if a kernel equals another kernel. More...
 
function copy = clone (copy)
 The interface method with returns a copy of the current class instance. More...
 
virtual function Nabla = getNabla (x, y)
 Computes the partial derivatives with respect to each component of the first argument. More...
 
virtual function c = getGlobalLipschitz ()
 Returns the global lipschitz constant of this kernel. 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 Attributes

double Gamma = 1
 Univariate scaling. More...
 
- Public Attributes inherited from kernels.BaseKernel
matrix< doubleG = 1
 The matrix \(\vG\) that induces the state space scalar product \(\spG{x}{y}\) and norm \(\noG{x-y}\) to use. More...
 
matrix< doubleP = "[]"
 Projection/selection matrix \(\vP\) for argument components. More...
 
logical IsRBF = false
 Flag that determines if the current kernel is a radial basis function, i.e. its evaluation is of the form \(\K(x,y) = \phi(\noG{x-y})\) for some scalar function \(\phi\). More...
 
logical IsScProd = false
 Flag that determines if the current kernel bases on scalar product evaluations, i.e. are of the form \(\K(x,y) = \phi(\spG{x}{y})\) for some scalar function \(\phi\). 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...
 

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)
 
- Protected Attributes inherited from kernels.BaseKernel
 fG = 1
 
 fP = "[]"
 

Constructor & Destructor Documentation

kernels.ARBFKernel.ARBFKernel ( )

Definition at line 72 of file ARBFKernel.m.

References kernels.BaseKernel.IsRBF.

Member Function Documentation

function copy = kernels.ARBFKernel.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.

Reimplemented in kernels.BellFunction.

Definition at line 108 of file ARBFKernel.m.

References Gamma.

function bool = kernels.ARBFKernel.eq (   B)

Definition at line 103 of file ARBFKernel.m.

function K = kernels.ARBFKernel.evaluate ( matrix< double x,
matrix< double y 
)
virtual

Evaluates the rotation and translation invariant kernel.

Default implementation, computes the squared difference norm, takes the square root and calls evaluateScalar with it.

If \(y_j\) is set, the dimensions of \(x_i\) and \(y_j\) must be equal for all \(i,j\).

Attention
Should your implementation effectively use the squared value directly, consider overriding this method in your subclass for speed (avoid subsequent squarerooting and squaring)
Parameters
xFirst set \(x_i \in \R^d\) of \(n\) vectors
ySecond set \(y_j \in \R^d\) of \(m\) vectors. If y is empty \(y_i = x_i\) and \(n=m\) is assumed.
Return values
KThe evaluation matrix \(\K(x, y) \in \R^{n\times m}\) of the radial basis function, with entries \(\K(x_i,y_j)\) at \(i,j\).

Implements kernels.BaseKernel.

Reimplemented in kernels.InvMultiquadrics.

Definition at line 78 of file ARBFKernel.m.

References evaluateScalar(), and getSqDiffNorm().

Here is the call graph for this function:

function phir = kernels.ARBFKernel.evaluateScalar ( matrix< double r)
pure virtual

Allows the evaluation of the function \(\phi(r)\) for scalar \(r\) directly.

Implementations must accept matrix valued \(r\) and evaluate by component-based means.

Parameters
rThe radius matrix \(\vR\in\R^{n\times m}\)
Return values
phirThe evaluation matrix \(\phi(R)\in\R^{n\times m}\) with entries \(\phi(R)_{ij} = \phi(r_{ij})\).

Referenced by evaluate(), kernels.BellFunction.ModifiedNewton(), kernels.BellFunction.optFun(), and demos.BellFunctions.SecantGradientPlots().

Here is the caller graph for this function:

function r = kernels.ARBFKernel.getSqDiffNorm ( matrix< double x,
matrix< double y 
)

Returns the weighted squared norm \(r\) of the difference \(\noG{x-y}^2/\gamma^2\).

The evaluation respects and projection matrix \(\vP\) that might be set at kernels.BaseKernel. In this case the matrix \(\vG\) must match the projected sizes of the argument vectors.

Note
Evaluation of the squared norm is preferred over computing the squareroot afterwards, as most kernels need the squared value anyways.

If \(y_j\) is set, the dimensions of \(x_i\) and \(y_j\) must be equal for all \(i,j\).

See Also
kernels.BaseKernel.P kernels.ARBFKernel.G
Parameters
xFirst set \(x_i \in \R^d\) of \(n\) vectors
ySecond set \(y_j \in \R^d\) of \(m\) vectors. If y is empty \(y_i = x_i\) and \(n=m\) is assumed.
Return values
rThe matrix \(\vR \in \R^{n\times m}\) with entries \(R_{ij} = \norm{x_i-y_j}{G}^2/\gamma^2\)
Note
This method has the MATLAB method attribute Sealed set to true. It cannot be overwritten.
matlab documentation of method attributes.

Definition at line 116 of file ARBFKernel.m.

References kernels.BaseKernel.fG, and kernels.BaseKernel.fP.

Referenced by kernels.GaussKernel.evaluate(), evaluate(), and kernels.InvMultiquadrics.evaluate().

Here is the caller graph for this function:

Member Data Documentation

kernels.ARBFKernel.Gamma = 1

Univariate scaling.

Property class critical:
Greatly influences the kernels behaviour.

Default: 1

Note
This property has the MATLAB attribute SetObservable set to true.
Matlab documentation of property attributes.
Todo:
check why penalty factor was set here to 1/value! ?!?
Note
This property has custom functionality when its value is changed.

Definition at line 55 of file ARBFKernel.m.

Referenced by clone(), kernels.GaussKernel.clone(), kernels.GaussKernel.evaluate(), kernels.InvMultiquadrics.evaluate(), kernels.GaussKernel.evaluateD1(), kernels.GaussKernel.evaluateD2(), kernels.InvMultiquadrics.evaluateScalar(), kernels.GaussKernel.GaussKernel(), kernels.GaussKernel.getNabla(), and kernels.GaussKernel.setGammaForDistance().


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