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

The correlation matrix should be calculated in signal voxels #888

Closed
JulioAPeraza opened this issue May 31, 2024 · 1 comment · Fixed by #889
Closed

The correlation matrix should be calculated in signal voxels #888

JulioAPeraza opened this issue May 31, 2024 · 1 comment · Fixed by #889
Labels
enhancement New feature or request

Comments

@JulioAPeraza
Copy link
Collaborator

JulioAPeraza commented May 31, 2024

Summary

I now notice that we calculate the correlation matrix in Stouffers in all the voxels, even the ones with 0 or Nan. I think we can apply the aggressive mask to all images and then calculate the correlation matrix. We can also save that matrix in the estimator because we will use it in the report module.

Additional details

Saving the matrix will decrease the computation time in the Workflows but at the cost of extra memory in the estimator class.

Next steps

Apply the aggressive mask and calculate the correlation matrix in _preprocess_input. This will only affect Stouffers estimator.

@JulioAPeraza JulioAPeraza added the enhancement New feature or request label May 31, 2024
@JulioAPeraza
Copy link
Collaborator Author

For the liberal masking approach, I also realized that the voxel mask and study mask image-base inputs (e.g., beta and varcope) may differ. So we need to create and join with the mask across different inputs here

NiMARE/nimare/meta/ibma.py

Lines 144 to 147 in 2f0fa61

data_bags = zip(*_apply_liberal_mask(temp_arr))
keys = ["values", "voxel_mask", "study_mask"]
self.inputs_["data_bags"][name] = [dict(zip(keys, bag)) for bag in data_bags]

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

Successfully merging a pull request may close this issue.

1 participant