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
NuSVRConfig.m
Go to the documentation of this file.
1 namespace general{
2 namespace regression{
3 
4 
5 /* (Autoinserted by mtoc++)
6  * This source code has been filtered by the mtoc++ executable,
7  * which generates code that can be processed by the doxygen documentation tool.
8  *
9  * On the other hand, it can neither be interpreted by MATLAB, nor can it be compiled with a C++ compiler.
10  * Except for the comments, the function bodies of your M-file functions are untouched.
11  * Consequently, the FILTER_SOURCE_FILES doxygen switch (default in our Doxyfile.template) will produce
12  * attached source files that are highly readable by humans.
13  *
14  * Additionally, links in the doxygen generated documentation to the source code of functions and class members refer to
15  * the correct locations in the source code browser.
16  * However, the line numbers most likely do not correspond to the line numbers in the original MATLAB source files.
17  */
18 
20  :public IClassConfig {
39  public:
40 
41  Nus = "[]";
42 
43  Lambdas = "[]";
44 
45 
46  public:
47 
48  NuSVRConfig(values) {
49  if nargin == 1 && size(values,1) == 2
50  this.Nus= values(1,:);
51  this.Lambdas= values(2,:);
52  end
53  this.RequiredPrototypeClass= " general.regression.ScalarNuSVR ";
54  this.Prototype= general.regression.ScalarNuSVR;
55  }
56 
57 
58  function n = getNumConfigurations() {
59  n = length(this.Nus);
60  }
61 
62 
63  function svr = configureInstance(nr) {
64  svr = this.getProtoClass;
65  svr.nu= this.Nus(nr);
66  svr.Lambda= this.Lambdas(nr);
67  }
68 
69 
70  function str = getConfigurationString(nr,unused1) {
71  str = [];
72  if ~isempty(this.Nus)
73  str = sprintf(" \nu: %g, \lambda: %g ",this.Nus(nr),this.Lambdas(nr));
74  end
75  }
76 
77 
78  function str = getConfiguredPropertiesString() {
79  str = " nu, Lambda ";
80  }
81 
82 
83  function conf = getSubPart(partNr,totalParts) {
84  conf = this.clone;
85  idx = this.getPartIndices(partNr, totalParts);
86  conf.Nus= this.Nus(idx);
87  conf.Lambdas= this.Lambdas(idx);
88  }
89 
90 
91  function copy = clone() {
92  copy = general.regression.NuSVRConfig;
93  copy = clone@IClassConfig(this, copy);
94  copy.Nus= this.Nus;
95  copy.Lambdas= this.Lambdas;
96  }
97 
98 
99 
100  protected:
101 
102  function collectRanges(ptable,proppath) {
103  this.addRange(ptable, [proppath [" nu "]],min(this.Nus),max(this.Nus));
104  this.addRange(ptable, [proppath [" Lambda "]],min(this.Lambdas),max(this.Lambdas));
105  }
106 
107 
108 
109 };
110 }
111 }
112 
IClassConfig: Abstract interface for a set of configurations that can be applied to a given algorithm...
Definition: IClassConfig.m:17
function idx = getPartIndices(partNr, totalParts)
Definition: IClassConfig.m:130
function ptype = getProtoClass()
Definition: IClassConfig.m:122
function str = getConfiguredPropertiesString()
Returns a string of the changed properties by this IClassConfig instance.
Definition: NuSVRConfig.m:78
function addRange(ptable, proppath, minval, maxval)
Definition: IClassConfig.m:136
function conf = getSubPart(partNr, totalParts)
Definition: NuSVRConfig.m:83
function svr = configureInstance(nr)
Definition: NuSVRConfig.m:63
ICloneable Prototype
The prototype class that is to be used as base class before configuring a new instance.
Definition: IClassConfig.m:42
function collectRanges(ptable, proppath)
Definition: NuSVRConfig.m:102
function str = getConfigurationString(nr, unused1)
Definition: NuSVRConfig.m:70
function copy = clone()
Definition: NuSVRConfig.m:91
char RequiredPrototypeClass
Determines the class that is allowed to be configured.
Definition: IClassConfig.m:55
function n = getNumConfigurations()
Returns the number of configurations that can be applied.
Definition: NuSVRConfig.m:58