-
Notifications
You must be signed in to change notification settings - Fork 586
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
Incomprehensible ValueError thrown by RegionExtractor #907
Comments
Would you mind describing in more details the part of the error message you find incomprehensible? It seems that you have provided threshold=3 and it is telling you you 0. < threshold <= 2. |
I will go into more detailed version of this input type, what happens when user gave a list of 4D imgs. But as far as I see it should be a single 4D Nifti like object not a list of objects. If that's the case, I agree its incomprehensible error message. I will check it anyway. Do you also have problem with single 4D image ? |
But as far as I see it should be a single 4D Nifti like object not a
list of objects. If that's the case, I agree its incomprehensible error
message.
No, I don't think that this is the problem. Nilearn correctly detects
that this is equivalent to a 4D niimg.
The problem is that Elvis didn't understand the bounds of the parameter.
Now that I realize it, that parameter should probably be a fraction, ie
between 0 and 1 independantly of the number of maps input, and it would
be internally multiplied by n_maps.
What do people think?
|
After discussing IRL with @AlexandreAbraham, it seems that it is simply
me who does not understand the error message, and that the
parametrization is correct.
With only 2 maps, it is not possible to allocate voxels to 3 maps on
average.
|
All this makes sense, but will be suprising to many people who have done neuroimaging with other tools: they are used to equating 'thresholds' and 'statistical thresholds', while the concept of threshold used here is different, something like a 'selection threshold'. Maybe we should give a more explicit naming. |
Maybe we should give a more explicit naming.
Yes. I cannot think of one right now, but I agree.
|
'ratio', 'selection_ratio' ? |
Just to share some information about the usage of threshold and its strategies: regions extraction based on statistical thresholds can be used based upon selecting regions extraction based on selection threshold can be done upon selecting In this particular error case, selecting We had naming problem before. Since, we have two different strategies, fixing one name from current |
'cutoff'? |
I feel 'cutoff' than 'threshold' is even more difficult to reach to users. |
I am thinking of fixing this issue by rewriting error message as below: threshold=3.0 provided to select for number of nonzero voxels across total number of maps (n_maps) is not valid. Please provide valid number between 0. and n_maps=2 What do you think ? @dohmatob @lesteve @GaelVaroquaux @AlexandreAbraham @banilo |
'number of nonzero voxels across total number of maps (n_maps)' is still unclear to me, because when you say "number of nonzero voxels" people will think "maybe several hundreds (or thousands)". |
Is it not clear in terms of documentation or implementation ? I am not sure which part is hard to figure ? |
It is easier to explain but it defeats the purpose of the method presented here. The main advantage of this thresholding approach is that you can chose a value corresponding to a certain level of sparsity in the brain (1 if you want to avoid overlap, up to 3 if overlaps are OK for you) and then, no matter how many maps you provide, your atlas will always "look" the same, no adjustment needed. When dealing with a lot of atlases, I find it very convenient. |
This makes sense, but then we need a serious refactoring of the documentation to clarify this, and ideally an example dedicated to region extraction that illustrates the impact of these parameters. |
On 13/01/2016 10:06, KamalakerDadi wrote:
|
Right, but that's exactly what the object is there for. It should probably be named different, with a name that stresses that it |
ping @GaelVaroquaux @AlexandreAbraham @lesteve I would like to know your opinion and ideas to bring code to more user friendly and understandable. I am working on to propose some idea. Meanwhile, any ideas or suggestions would be really helpful and great. |
I'll find time to expand on the issue desc and provide minimal example to rep.
RegionExtractor(["image1.nii", "image2.nii"], threshold=3.)
Throws error:
The text was updated successfully, but these errors were encountered: