bbfrederick/rapidtide

Support moving average-based PCA dimensionality estimation

Opened this issue · 5 comments

tsalo commented

Is your feature request related to a problem? Please describe.
Using MA-PCA would serve as an alternative to the buggy MLE-PCA in scikit-learn.

Describe the solution you'd like
tedana implements MA-PCA for dimensionality reduction. We can incorporate this approach into rapidtide, whether by adding tedana as a dependency or (more likely) by copying the code over directly (with attribution, of course), since tedana has a fairly permissive license.

Describe alternatives you've considered
Currently @bbfrederick has implemented a workaround for failed MLE-PCA that chooses the components which explain 80% of the variance.

Additional context
This stems from 1308d59#r44963454.

tsalo commented

I chatted with the other tedana devs and we're planning to extract the MA-PCA code from tedana into its own small package, so that way other tools (in particular rapidtide) will be able to use the methods without adding tedana as a dependency. We're just waiting to hear back from the GIFT devs (from whom we got a MATLAB-based MA-PCA implementation that we then converted to Python) about licensing and whatnot. Hopefully we'll have a separate package available for rapidtide to use soon!

Cool!

tsalo commented

We finally released mapca on PyPi, so if you're still interested this should be doable now.

Yes, I would be!

tsalo commented

The MA-PCA approach works by downsampling imaging data in image-space (i.e., as 4D arrays of shape X x Y x Z x T), so would it be possible to use nibabel Nifti1Image objects in the relevant functions?