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
SigmoidKernel.m
Go to the documentation of this file.
1 namespace kernels{
2 
3 
4 /* (Autoinserted by mtoc++)
5  * This source code has been filtered by the mtoc++ executable,
6  * which generates code that can be processed by the doxygen documentation tool.
7  *
8  * On the other hand, it can neither be interpreted by MATLAB, nor can it be compiled with a C++ compiler.
9  * Except for the comments, the function bodies of your M-file functions are untouched.
10  * Consequently, the FILTER_SOURCE_FILES doxygen switch (default in our Doxyfile.template) will produce
11  * attached source files that are highly readable by humans.
12  *
13  * Additionally, links in the doxygen generated documentation to the source code of functions and class members refer to
14  * the correct locations in the source code browser.
15  * However, the line numbers most likely do not correspond to the line numbers in the original MATLAB source files.
16  */
17 
19  :public kernels.BaseKernel {
33  public:
34 
35  kappa = 1;
46  nu = -1;
57  public:
58 
59 
61  this.registerProps(" kappa "," nu ");
62  this.IsScProd= true;
63  if nargin > 0
64  this.kappa= kappa;
65  if nargin > 1
66  this.nu= nu;
67  end
68  end
69  }
70 
71 
72  function copy = clone() {
73  copy = clone@kernels.BaseKernel(this, kernels.SigmoidKernel);
74  copy.kappa= this.kappa;
75  copy.nu= this.nu;
76  }
77 
78 
79  function c = getGlobalLipschitz() {
80  error(" Not implemented yet! ");
81  }
89  function Nabla = getNabla(colvec<double> x,matrix<double> y) {
90  error(" Not implemented yet! ");
91  }
103  if ~isempty(this.P)
104  x = x(this.P,:);
105  end
106  if nargin == 2 || isempty(y)
107  y = x;
108  else
109  if ~isempty(this.P)
110  y = y(this.P,:);
111  end
112  end
113  K = tanh( this.kappa * x^t*(this.G*y) + this.nu);
114  }
115 
116 
117 
118 #if 0 //mtoc++: 'set.kappa'
119 function kappa(value) {
120  if ~isposrealscalar(value)
121  error(" kappa must be a real scalar and positive ");
122  end
123  this.kappa= value;
124  }
125 
126 #endif
127 
128 
129 
130 #if 0 //mtoc++: 'set.nu'
131 function nu(value) {
132  if ~isposrealscalar(-value)
133  error(" kappa must be a real scalar and negative ");
134  end
135  this.nu= value;
136  }
137 
138 #endif
139 
140 
150 };
151 }
152 
153 
154 
function c = getGlobalLipschitz()
Definition: SigmoidKernel.m:79
nu
The constant inside tanh.
Definition: SigmoidKernel.m:46
function K = evaluate(colvec< double > x,matrix< double > y)
SIGMOIDKERNEL The sigmoid kernel.
Definition: SigmoidKernel.m:18
SigmoidKernel(kappa, nu)
Definition: SigmoidKernel.m:60
function registerProps(varargin)
Call this method at any class that defines DPCM observed properties.
Definition: DPCMObject.m:125
function Nabla = getNabla(colvec< double > x,matrix< double > y)
Definition: SigmoidKernel.m:89
function copy = clone()
Definition: SigmoidKernel.m:72
matrix< double > P
Projection/selection matrix for argument components.
Definition: BaseKernel.m:65
logical IsScProd
Flag that determines if the current kernel bases on scalar product evaluations, i.e. are of the form for some scalar function .
Definition: BaseKernel.m:105
function res = isposrealscalar(value)
isposintscalar: Backwards-compatibility function for matlab versions greater than 2012a ...
Base class for all KerMor Kernels.
Definition: BaseKernel.m:18
kappa
The factor for the scalar product inside tanh.
Definition: SigmoidKernel.m:35
matrix< double > G
The matrix that induces the state space scalar product and norm to use.
Definition: BaseKernel.m:45