Skip to content

rsa.compareRefRDM2candRDMs bug with case 'randomisation' when nan in models #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
iancharest opened this issue Apr 25, 2017 · 0 comments

Comments

@iancharest
Copy link
Contributor

case 'randomisation'
        fprintf('\nPerforming condition-label randomisation test of RDM relatedness (fixed effects).\n');
        nRandomisations = userOptions.nRandomisations;
        for rdmI = 1:numel(candRDMs)
            % do the randomisation test, also keep the randomistion correltions
            % in a separte matrix
            rdms(rdmI,:) = vectorizeRDM(meanCandRDMs(:,:,rdmI));
        end
        [n,n]=size(meanRefRDM);
        exhaustPermutations = false;
        if n < 8
            allPermutations = exhaustivePermutations(n);
            nRandomisations = size(allPermutations, 1);
            exhaustPermutations = true;
            warning('(!) Comparing RDMs with fewer than 8 conditions (per conditions set) will produce unrealiable results!\n  + I''ll partially compensate by using exhaustive instead of random permutations...');
        end%if

Performing condition-label randomisation test of RDM relatedness (fixed effects).
Undefined function or variable 'exhaustivePermutations'.

Error in rsa.compareRefRDM2candRDMs (line 622)
allPermutations = exhaustivePermutations(n);

The bug comes in the randomisation and seems to be driven by the fact that one of the model rdms had nans in it.

Should the possibility of having nans in the model RDMs be added to the toolbox?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant