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.regression.KernelLS Class Reference

KERNELLS Least-Squares kernel regression ("Rigde Regression") Since the systems can be considerably large, the pcg solver is used instead of plain inversion. More...

Detailed Description

KERNELLS Least-Squares kernel regression ("Rigde Regression") Since the systems can be considerably large, the pcg solver is used instead of plain inversion.

Author
Daniel Wirtz 21.03.2010
Change in 0.4:
(Daniel Wirtz, 2011-05-03) Removed \(b\) offset terms as no longer used in kernel expansions.
Todo:
add unit test

Definition at line 19 of file KernelLS.m.

Public Member Functions

 KernelLS ()
 
function copy = clone ()
 
function [ a ,
sf ] = 
regress (fx, ainit)
 
function  init (kernels.KernelExpansion kexp)
 % IKernelCoeffComp interface members Sets the kernel matrix. More...
 
function [ ai ,
svidx ,
sf ] = 
computeKernelCoefficients (yi, initialai)
 Kernel coefficient computation. 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...
 

Public Attributes

 K
 The kernel matrix to use for LS regression. More...
 
double lambda = 1
 The regularization term weight. More...
 
 CGMaxIt = "[]"
 Maximum iteration count for the conjugate gradient method. More...
 
 CGTol = 1e-6
 Tolerance for cg method. More...
 
 MaxStraightInvDim = 2000
 Maximum dimension of function for which direct inversion is performed instead of pcg. 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.regression.KernelLS.KernelLS ( )

Definition at line 119 of file KernelLS.m.

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

Here is the call graph for this function:

Member Function Documentation

function copy = general.regression.KernelLS.clone ( )

Definition at line 125 of file KernelLS.m.

References CGMaxIt, CGTol, K, lambda, and MaxStraightInvDim.

function [ai , svidx , sf ] = general.regression.KernelLS.computeKernelCoefficients (   yi,
  initialai 
)
virtual

Kernel coefficient computation.

Here the concrete class performs the approximation calculation for given function evaluation points \(y_i = f(x_i)\) at the centers \(x_i\) also used to compute the kernel matrix passed to the IKernelCoeffComp.init method.

See Also
init
Parameters
yiThe function values \(f(x_i)\) as column vector. If MultiTargetComputation is true, this can be a matrix of column vectors.
initialaiThe values to use as initial coefficients. It is up to the implementing classes to use those if passed; however, a call with empty argument must be possible, too.
Return values
ciThe coefficients \(c_{k,i}\) of \(f_k(x)\) as ROW vector.
svidxThe used support vector indices \(i\) of \(x_i\). Always required. (Set to 1:n if no sparsity is given by the coeffcomp method)

Implements IKernelCoeffComp.

Definition at line 169 of file KernelLS.m.

References regress().

Here is the call graph for this function:

function general.regression.KernelLS.init ( kernels.KernelExpansion  kexp)

% IKernelCoeffComp interface members Sets the kernel matrix.

Parameters
kexpThe kernel expansion
Required fields of kexp:

Definition at line 155 of file KernelLS.m.

References kernels.KernelExpansion.getKernelMatrix(), and K.

Here is the call graph for this function:

function [a , sf ] = general.regression.KernelLS.regress (   fx,
  ainit 
)
Todo:
-why does pcgs pcg not work here? matrix is symmetric!

Definition at line 136 of file KernelLS.m.

References CGMaxIt, CGTol, K, lambda, MaxStraightInvDim, StopFlag.SUCCESS, and t.

Referenced by computeKernelCoefficients().

Here is the caller graph for this function:

Member Data Documentation

general.regression.KernelLS.CGMaxIt = "[]"

Maximum iteration count for the conjugate gradient method.

Property class alglimit:
Limits the iterations for the pcg method.
See Also
pcg, bicg
Note
This property has the MATLAB attribute SetObservable set to true.
Matlab documentation of property attributes.
Default: "[]"
This property has custom functionality when its value is changed.

Definition at line 68 of file KernelLS.m.

Referenced by clone(), and regress().

general.regression.KernelLS.CGTol = 1e-6

Tolerance for cg method.

Property class critical:
The error tolerance for the pcg method.
See Also
pcg, bicg
Note
This property has the MATLAB attribute SetObservable set to true.
Matlab documentation of property attributes.
Default: 1e-6
This property has custom functionality when its value is changed.

Definition at line 84 of file KernelLS.m.

Referenced by clone(), and regress().

general.regression.KernelLS.K

The kernel matrix to use for LS regression.

% Getter & setter

Property class data:
Needed for LS to work in the first place.
Note
This property has the MATLAB attribute SetObservable set to true.
Matlab documentation of property attributes.
This property has custom functionality when its value is changed.

Definition at line 40 of file KernelLS.m.

Referenced by clone(), init(), and regress().

general.regression.KernelLS.lambda = 1

The regularization term weight.

Property class important:
If the data is badly conditioned increasing lambda can help.

Default: 1

Note
This property has the MATLAB attribute SetObservable set to true.
Matlab documentation of property attributes.
This property has custom functionality when its value is changed.

Definition at line 53 of file KernelLS.m.

Referenced by clone(), and regress().

general.regression.KernelLS.MaxStraightInvDim = 2000

Maximum dimension of function for which direct inversion is performed instead of pcg.

Property class optional:
Direct inversion is more precise for small sizes.

Default: 2000

Note
This property has the MATLAB attribute SetObservable set to true.
Matlab documentation of property attributes.
This property has custom functionality when its value is changed.

Definition at line 100 of file KernelLS.m.

Referenced by clone(), and regress().


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