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.BaseScalarSVR Class Referenceabstract

SCALARSVR Scalar support vector regression. More...

Detailed Description

SCALARSVR Scalar support vector regression.

Base class for any scalar SVR algorithm.

Author
Daniel Wirtz
Date
2010-03-11
Change in 0.5:
(Daniel Wirtz, 2011-11-09) Also allowing to pass a double matrix to the setter for the K property.
Change in 0.5:
(Daniel Wirtz, 2011-08-22) Added the regularization parameter Lambda and made the C constraint dependent on that, as also done in literature. Moved the QPSolver to the classes that really use one.
Change in 0.4:
(Daniel Wirtz, 2011-05-31) Removed the svidx parameter from the regress interface.
Change in 0.3:
(Syed Ammar, 2011-05-07) Implemented Setter for the properties of this class
Todo:
  • Implement hyperparameter estimations from [CM04]!
  • Look into the "pattern search" algorithm from Momma&Bennet 2002
  • Create single MaxIterations property for all SVRs (if applicable)

Definition at line 19 of file BaseScalarSVR.m.

Public Member Functions

 BaseScalarSVR ()
 
function target = clone (target)
 The interface method with returns a copy of the current class instance. More...
 
function  init (kernels.KernelExpansion kexp)
 % IKernelCoeffComp interface members Sets the kernel matrix. More...
 
function [ rowvec ci , integer svidx ,
sf ] = 
computeKernelCoefficients (rowvec yi, initialai)
 Implementation of the kernels.ICoeffComp interface. More...
 
virtual function [
ci ,
integer sf ] = 
regress (fxi,rowvec initialai)
 Performs the actual regression (template method) 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...
 

Public Attributes

double AlphaRelMinValue = eps
 Minimum relative value for any alpha to be considered a support vector coefficient. More...
 
data.FileMatrix K
 The kernel matrix to use. More...
 
double Lambda
 The regularization parameter \(\lambda\) for the primary minimization problem. 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...
 

Protected Attributes

double C = .5
 The weighting of the slack variables. 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.BaseScalarSVR.BaseScalarSVR ( )

Definition at line 144 of file BaseScalarSVR.m.

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

Here is the call graph for this function:

Member Function Documentation

function target = general.regression.BaseScalarSVR.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.

Definition at line 150 of file BaseScalarSVR.m.

References AlphaRelMinValue, C, and K.

function [ rowvec ci , integer svidx , sf ] = general.regression.BaseScalarSVR.computeKernelCoefficients ( rowvec  yi,
  initialai 
)

Implementation of the kernels.ICoeffComp interface.

See Also
AlphaRelMinValue
Parameters
yiThe target values \(y_i\) as row vector
initialaiInitial values for the coefficients \(c_i\)
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 221 of file BaseScalarSVR.m.

References AlphaRelMinValue, StopFlag.NO_SUPPORT_VECTORS_FOUND, and regress().

Here is the call graph for this function:

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

% IKernelCoeffComp interface members Sets the kernel matrix.

Parameters
kexpThe kernel expansion
Required fields of kexp:

Definition at line 207 of file BaseScalarSVR.m.

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

Here is the call graph for this function:

function [ ci , integer sf ] = general.regression.BaseScalarSVR.regress (   fxi,
rowvec  initialai 
)
pure virtual

Performs the actual regression (template method)

See Also
StopFlag
Parameters
fxiThe \(f(x_i)\) values to regress given the kernel matrix \(K\) computed from \(\K(x_i,x_j)\).
initialaiThe initial values to use for the coefficients \(c_i\). Default: []
Return values
ciThe kernel expansion coefficients \(c_i\).
sfThe stop flag

Referenced by computeKernelCoefficients().

Here is the caller graph for this function:

Member Data Documentation

general.regression.BaseScalarSVR.AlphaRelMinValue = eps

Minimum relative value for any alpha to be considered a support vector coefficient.

Relative means in this context alpha values divided by the absolute maximum over all values.

Property class optional:
The threshold of 16 magnitudes below the maximum coefficient should be small enough to not have any bad influence but improve performance.
Default:
: eps (2.2e-16)
Note
This property has the MATLAB attribute SetObservable set to true.
Matlab documentation of property attributes.
Default: eps
This property has custom functionality when its value is changed.

Definition at line 52 of file BaseScalarSVR.m.

Referenced by clone(), and computeKernelCoefficients().

general.regression.BaseScalarSVR.C = .5
protected

The weighting of the slack variables.

Gets computed when Lambda is set, equals \(C = \frac{1}{2\lambda}\).

See Also
ScalarNuSVR ScalarEpsSVR
Note
This property has non-standard access specifiers: SetAccess = Private, GetAccess = Protected
Matlab documentation of property attributes.
Default: .5

Definition at line 112 of file BaseScalarSVR.m.

Referenced by clone(), general.regression.ScalarNuSVR.regress(), and general.regression.ScalarEpsSVR.regress().

general.regression.BaseScalarSVR.K

The kernel matrix to use.

The reason why this is a property and not an argument is that once a matrix is set multiple regressions for the same base vector set can be performed easily.

Property class data:
Needed for the SVR to run in the first place.
Note
This property has custom functionality when its value is changed.

Definition at line 75 of file BaseScalarSVR.m.

Referenced by clone(), init(), general.regression.ScalarEpsSVR.regress(), and general.regression.ScalarNuSVR.regress().

general.regression.BaseScalarSVR.Lambda

The regularization parameter \(\lambda\) for the primary minimization problem.

Property class critical:
Overly regularized functions may not approximate the data correctly, while small \(\lambda\) lead to high coefficient values.

Default: 1

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

Definition at line 93 of file BaseScalarSVR.m.


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