Closed benjybarnett closed 1 month ago
Hi @benjybarnett , the problem occurs because one of LDA hyperparameters (cfg.hyperparameter.prob = 1
) needs to be set accordingly.
However, in this case it makes sense to actually adapt the default value for LDA, which I now included in mv_check_inputs
. Your example should work now out of the box, can you please pull the latest changes and confirm?
Hi @treder thanks for looking into this! I see that I should have specified that now..however addressing that with my own cfg.hyperparameter.prob = 1 call or pulling the latest version just causes the following error to appear:
Unrecognized function or variable 'Sw'.
Error in train_lda (line 199)
cf.Sw = Sw;
Error in mv_classify (line 486)
cf= train_fun(cfg.hyperparameter, X_ix, trainlabel);
This is following the same code snippet as before. Cheers!
I see - I think you have more features than samples right? The problem is that by default LDA chooses the dual form of the solution which has no covariance matrix (but it's needed for the probability calculation). So you would also have to set cfg.hyperparameter.form = 'primal'
(the default is auto
). Again I changed the default settings in the toolbox so if you pull again you shouldn't need to set this manually (hope it works this time round)
ah - thank you very much :)
Hi. I am trying to run a simple binary cross-decoding analysis, and I would like classifier output to show the predicted class probabilities.
I am using the following code:
But I receive the following error:
It looks like the test_LDA function cannot compute the probability. I think because the code in mv_classify is failing to pass on the correct output_type. Although I can't quite figure it out. Would appreciate any insights!