treder / MVPA-Light

Matlab toolbox for classification and regression of multi-dimensional data
MIT License
70 stars 35 forks source link

mv_classify cannot generalize across time with neighbours #31

Open nastarandarjani opened 2 years ago

nastarandarjani commented 2 years ago

Hi How can I classify and generalize across time with 3 neighbours? mv_classify cannot do that and asserts 'Searchlight and generalization are currently not supported simultaneously'.

treder commented 2 years ago

Hi, the problem that for performance reasons MVPA Light reshapes the multi-dimensional array when doing generalization (t avoid looping over the second dimension). This is easily doable without neighbours, with neighbours you essentially need a double loop (one for train, one for test).

It would be ugly to include it in the current mv_classify code so I have to think about how to do it. For now I'm afraid you have to do the double loop yourself and do the train/test manually.