PRTools contents |
REGOPTC
[W,PARS] = REGOPTC(A,CLASSF,PARS,DEFS,NPAR,PAR_MIN_MAX,TESTFUN,REALINT)
Input | |
A | Dataset, training set |
CLASSF | Untrained classifiers (mapping) |
PARS | Cell array with parameters for CLASSF |
DEFS | Defaults for PARS |
NPAR | Index in PARS of parameters to be optimised |
PAR_MIN_MAX | Minimum and maximum values of the search interval for the parameters to be optimised |
TESTFUN | Criterion function to be minimized, default TESTC |
REALINT | 0/1 vector, indicating for every parameter in PARS whether it is real (1) or integer (0). Default: all real. |
Output | |
W | Best classifier, trained by A |
PARS | Resulting parameter vector |
The final parameters PARS can also be retrieved by GETOPT_PARS. This is useful if W is optimised inside training a classifier that does not return these parameters in the output.
For examples of usage inside a classifier see LDC and SVC. Consequently LDC can be called as in the below example.
A = GENDATD([30 30],50);
W = LDC(A,0,NaN); % set first reg par to 0 and optimise second.
GETOPT_PARS % retrieve optimal paameter set
datasets, mappings, crossval, testc, getopt_pars,
PRTools contents |