Skip to content
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

FIX/ENH: permutation_t_test inefficient for many perumations and and big input matrices #2165

Open
dengemann opened this issue May 29, 2015 · 5 comments

Comments

@dengemann
Copy link
Member

I suspect the reason is here:

https://github.com/mne-tools/mne-python/blob/master/mne/stats/permutations.py#L54

To give a simplified example:
If you have 50000 permutations, 5 jobs, and fsaverage source space data for a group of subject these dot products become heavy as via array split perms would be of size 10000, n_samples

Symptoms:

  • computers die from memory and swapping limits

We should maybe change the parallelization and re-evaluate speed/memory tradeoffs.

@dengemann
Copy link
Member Author

cc @Eric89GXL @agramfort

@dengemann
Copy link
Member Author

To be added: running the with 1 job is not a problem.

@dengemann
Copy link
Member Author

It turns out it's simply the dot products's memory consumption.
1 big dot product (n_jobs=1) is still ok, but all the copies generated by parallel force computers down.
We could write an inner loop that specifies a buffer size and makes sure the length of perms does not exceed 1000 or so.

@agramfort
Copy link
Member

agramfort commented May 29, 2015 via email

@larsoner
Copy link
Member

Yeah it should be simple enough to do it in chunks, the speed penalty should be small. you can even just keep track of the max on each loop since at the end that's what it's doing anyway.

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

3 participants