-
Notifications
You must be signed in to change notification settings - Fork 76
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
Duplicated random and uniform options for perturb_baseline #106
Comments
I agree with this. can uniform be kept, and the bounds be made optionalparameters with default values 0 and 1? this would nicely collapse both cases. further remark: why use the python built-in random number generator instead e.g. numpy? this is a question out of curiosity, not a suggestion, gut feeling says numpy might be faster when pulling lots of random values, which we usually will do in eg. perturbation tests. further remarks on the module referenced by @rodrigobdz: think rgb-color images (where values only describe location x channe voxels. or time series data. an option to pass custom baseline values might be of interest (which somehow align with some axes of the input space via broadcasting) |
Thank you both. I agree that keeping the uniform option is better. I've excluded the "random" option now, plus changed to Please see PR/ commit here: 704e392 @rodrigobdz do you want to take a look? |
@annahedstroem I like that you added a deprecation notice for Here are a few occurrences still pending removal/modification in the same file: Quantus/quantus/helpers/utils.py Line 3 in 704e392
Quantus/quantus/helpers/utils.py Line 95 in 704e392
|
The fixes in I've left it in the tutorials as we might be using the random in other operations there. |
Thank you @rodrigobdz If there is no further comment, I'll close the issue. |
Thanks, we can close the issue then. |
Subject: Random number generation
The
random
anduniform
values for theperturb_baseline
parameter in the metrics are semantically overlapping. While both return the same values, therandom
function is more restrictive regarding its bounds.Giving the user the option between
random
anduniform
can be confusing, it would be preferable to only offeruniform
instead.Quantus/quantus/helpers/utils.py
Lines 78 to 79 in 1ecb500
The text was updated successfully, but these errors were encountered: