mickcrosse / mTRF-Toolbox

A MATLAB package for modelling multivariate stimulus-response data
https://cnspworkshop.net
BSD 3-Clause "New" or "Revised" License
78 stars 29 forks source link

mTRFcrossval : "too many output arguments" error #4

Open claraziane opened 4 years ago

claraziane commented 4 years ago

Hello,

I downloaded "mTRF-Toolbox-master" at "http://github.com/mickcrosse/mTRF-Toolbox/zip/master" and tried using the mTRFcrossval function but I got the following error :

K>> [r_Sp, p_Sp, mse_Sp, pred_Sp, model_Sp] = mTRFcrossval(env, responsesCell, fresample, -1, -150, 450, lambdas);
Error using mTRFcrossval
Too many output arguments.

The function however works when removing one of the output arguments (eg. model_Sp). I am not sure where the issue comes from as I believe I should be able to have all five arguments.

Thank you.

natezuk commented 4 years ago

Thank you for letting us know. The fourth output variable of mTRFcrossval on the master branch is now the model, and there is no output variable for the prediction. In its current form, mTRFcrossval uses 10-fold cross-validation by sampling each fold randomly across all trials. The function should be strictly used for cross-validation, not for computing predictions/reconstructions.

We are currently in between edits on the mTRF-toolbox, and we apologize for any inconvenience this has caused. We are working on a separate function that does trial-by-trial model prediction (a preliminary version can be found in the cv_help branch). In the meantime though, please use mTRFpredict to do model predictions, and for now I recommend using mTRFcrossval in the cv_help branch, which is compatible with the most recent version of mTRFpredict on the master branch.