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

Brain_Data iplot and plot produce different percentile thresholding #311

Open
ejolly opened this issue Jul 26, 2019 · 0 comments
Open

Brain_Data iplot and plot produce different percentile thresholding #311

ejolly opened this issue Jul 26, 2019 · 0 comments
Labels

Comments

@ejolly
Copy link
Collaborator

ejolly commented Jul 26, 2019

Several things to note and they might be related to #310:

  1. The way iplot works is that it calls nilearn.plotting.view_image under the hood which computes its threshold using this helper function. It turns out this is computed over the entire nifti image with no ability specify a mask. This means the percentile threshold will routinely be lower forbrain.iplot() than brain.plot() producing different figures. See the issue I opened here to track this is on the nilearn side: view_img percentile threshold behavior is a bit confusing nilearn/nilearn#2112

  2. iplot also has no way of specifying something comparable to threshold_lower in plot and instead uses the absolute value of the image and a single threshold. This means that maps that have negative and positive values will have different percentile bounds with both methods. plot takes into account the fact that distributions can be non-symmetrial whereas iplot does not

  3. Alsop worth noting that when percentile thresholding is performed on maps constructed using ROI masks, the bounds are determined using all voxels rather than rois, which means that the bounds are actually a bit more stringent than they ought to be.

TL;DR Dont use percentile thresholding with Brain_Data.iplot() for the moment. It produces results different from what you probably want.

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

No branches or pull requests

1 participant