Model types explained
We are well aware that documentation is not always complete and possibly even out of date in some cases. We try to document everything as best we can but much is limited by available time and manpower. We are are a university research group after all. The most up to date documentation can always be found (if not here) in the default.xml configuration file and, of course, in the source files. If something is unclear please dont hesitate to ask.
Also see the Using a model and Add Model Type pages.
Model (Abstract base class)
The Model
class serves as an overall base class, it is the interface to which all models should adhere.
RationalModel
A rational model tries to interpolate or approximate data by a rational function, like <math>3 x^2 y + 5 x y + 2x + 1</math> or by a quotient of 2 polynomial, like <math>\dfrac{xy + 2x + 6y + 2}{xy + 1}</math>
To decide which degrees (monomials) are present in numerator and denominator, the rational model depends on three model parameters:
- Variable weights W1 ... Wd (integer values, one for each dimension)
- Variable flags F1 ... Fd (boolean values, one for each dimension)
- An indicator for the degrees of freedom, P
To determine which degrees to use, this procedure is followed:
- Determine the number of sample points N
- Use P to determine the requested degrees of freedom: freedom = N * P / 100
- Select degrees based on weighting and flags, using following rules:
- Only variables for which Fi == false (0) are allowed in the denominator
- Monomials with degrees (a1 ... ad) get precedence over monomials with degrees (b1 ... bd) if and only if the expression a1*W1 + ... + ad*Wd < b1*W1 + ... + bd*Wd
The calculation of these suitable degrees are delegated to the Degrees class, which uses a Java implementation (Diophantine Solver) to order the monomials using the weighted expression.
Rationale: The weighting scheme is in place because the number of model parameters had to be restricted in some way. [Geest et al.] used such a weighting scheme before to discriminate between variables. The toolbox tries to select suitable values adaptively. In this way, it can eliminate variables which have no significant impact on the output (like in the Kotanchek example).
Please note that larger weights correspond to less important variables.
Two extra options are of interest:
- Selection of base function (a function handle)
- The frequencyVariable parameter (a variable name, or the keywords auto or off)
It is sometimes advantageous to use a different set of base functions. The default set is just the power function: 1, x, x^2, ... The toolbox provides two alternatives for this, the Legendre base functions, and the Chebyshev base functions. Each occurrence of x^i in the above should be read as the value of the i'th base function in x.
When the frequencyVariable parameter resolves to a variable name, or when it is set to auto and there is a variable named f, freq or frequency, that variable is treated differently. First of all it is scaled to by strictly positive. To do this the standard interval [-1,1] is rescaled to [j,2*j], in order to represent a true complex frequency. Then, a standard RationalModel is built, using only real coefficients. Only use this feature when complexHandling is set to 'complex', otherwise it is pointless.
SVMModel
SVMModel is the SUMO class for Support Vector Machines (SVM). It is a wrapper class for three different SVM implementations: LibSVM [1], SVM-Light [2] and LS-SVM [3]. You can find more information about each implementation on their websites and in the SVMModel code.
SVMModel has the following properties (note that some of these properties only apply to one specific implementation):
- backend: Chooses which SVM implementation to use. The following options are valid: libSVM, libSVM, and lssvm. By default LibSVM is used.
- kernel: Chooses the kernel of the SVM. The following options are available: rbf (radial basis functions), lin (linear), poly (polynomial), and sig (sigmoid)
- kernelParams: Lets you specify the specific kernel parameters, the options here are dependent on the backend used
- regularizationParam: Lets you specify the trade-off parameter between the margin and the training error. The regularization parameter will be 10^regularizationParam
- epsilon: Sets the epsilon parameter of support vector regression (SVR).
- stoppingTolerance: Sets the tolerance for the stopping criterion.
- nu: Set the nu parameter of nu-SVR and nu-SVC (only for LibSVM)
- type: Sets the type of LibSVM (nu-SVR, epsilon-SVR, etc...)
- crossvalidationFolds: Set the number of folds for LibSVM in cross-validation mode