Summary of what happened:
Hi!
We want to optimize the cost parameter c for multi-class SVM via grid search and nested cross-validation. This worked fine for a “normal” classification design with cross-validation, when calling it like this:
cfg.parameter_selection.method = 'grid';
cfg.parameter_selection.parameters = {'-c'};
cfg.parameter_selection.parameter_range = {[0.0001 0.001 0.01 0.1 1 10 100 1000]};
Now we would like to do the same in a cross-classification. Here we receive the following error message:
Command used (and if a helper script was used, a link to the helper script or the command generated):
Version:
Relevant log outputs (up to 20 lines):
Error using decoding_parameter_selection>run_nest (line 207)
Could not create design for nested cross-validation. Need correct information in field 'cfg.parameter_selection.design.function!'
Error in decoding_parameter_selection (line 116)
selected_parameters = run_nest(cfg,data_train,i_train_external,all_combinations);
Error in decoding (line 471)
cfg = decoding_parameter_selection(cfg,data_train,i_train);
Error in D5_Decoding_batch_XClass (line 145)
results = decoding(cfg);
Screenshots / relevant information:
We’ve already tried assigning the field cfg.parameter_selection.design.function
different outputs from the function make_design_xclass_cv(cfg)
, receiving the same or similar errors.
So the question is: Is this even possible? Do we use the function incorrectly or do we assign something the wrong way? To our understanding, the grid search for the optimal c-parameter should work the same for the cross-classification as it did for the normal design?
Any help would be appreciated!
Thanks in advance
Best,
Sara