The gurls command accepts exaclty four arguments:
Each time the data need to be changed (e.g. going from training phase to testing phase) gurls needs to be called again.
The three main fields in the options' structure are:
We want to run the training on a dataset {Xtr,ytr} and the test on a different dataset {Xte,yte}. We are interested in the precision-recall performance measure as well as the average classification accuracy. Here is how to do it.
name = 'ExampleExperiment';
opt = defopt(name);
opt.seq = {'paramsel:loocvprimal','rls:primal','pred:primal','perf:precrec','perf:macroavg'};
opt.process{1} = [2,2,0,0,0];
opt.process{2} = [3,3,2,2,2];
gurls (Xtr, ytr, opt,1)
gurls (Xte, yte, opt,2)
This would read somewhat like:
name = 'ExampleExperiment';
opt = defopt(name);
opt.seq = {'split:ho','paramsel:hoprimal','rls:primal','pred:primal','perf:macroavg','perf:precrec'};
opt.process{1} = [2,2,2,0,0,0];
opt.process{2} = [3,3,3,2,2,2];
gurls (Xtr, ytr, opt,1)
gurls (Xte, yte, opt,2)
name = 'ExampleExperiment';
opt = defopt(name);
opt.seq = {'kernel:linear', 'paramsel:loocvdual', 'rls:dual', 'pred:dual', 'perf:macroavg', 'perf:precrec'};
opt.process{1} = [2,2,2,0,0,0];
opt.process{2} = [3,3,3,2,2,2];
gurls (Xtr, ytr, opt,1)
gurls (Xte, yte, opt,2)
name = 'ExampleExperiment';
opt = defopt(name);
opt.seq = {'split:ho', 'kernel:linear', 'paramsel:hodual', 'rls:dual', 'pred:dual', 'perf:macroavg', 'perf:precrec'};
opt.process{1} = [2,2,2,2,0,0,0];
opt.process{2} = [3,3,3,3,2,2,2];
gurls (Xtr, ytr, opt,1)
gurls (Xte, yte, opt,2)
name = 'ExampleExperiment';
opt = defopt(name);
opt.seq = {'paramsel:siglam', 'kernel:rbf', 'rls:dual', 'predkernel:traintest', 'pred:dual', 'perf:macroavg', 'perf:precrec'};
opt.process{1} = [2,2,2,0,0,0,0];
opt.process{2} = [3,3,3,2,2,2,2];
gurls (Xtr, ytr, opt,1)
gurls (Xte, yte, opt,2)
name = 'ExampleExperiment';
opt = defopt(name);
opt.seq = {'split:ho', 'paramsel:siglamho', 'kernel:rbf', 'rls:dual', 'predkernel:traintest', 'pred:dual', 'perf:macroavg', 'perf:precrec'};
opt.process{1} = [2,2,2,2,0,0,0,0];
opt.process{2} = [3,3,3,3,2,2,2,2];
gurls (Xtr, ytr, opt,1)
gurls (Xte, yte, opt,2)