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
BF: Keep up with changes in scipy 0.16 #707
Conversation
Note - the first commit (arokem@7c4e670) are the substantial changes. The rest is just PEP8 fixes that I did while I was in this file already. |
Oh dear. Hey @stefanv - any ideas here? Looks pretty bad. |
Just to be clear on this one - these tests would have failed with previous versions of scipy as well (this PR basically just patches this up to the previous behavior, but adds more tests). It seems that RBF is just inaccurate in many use-cases, which we weren't thinking of before. |
Oy! This is strange. Does that mean that all the functionality with interpolating on spheres is now uncertain? |
Well - it was always uncertain. It's just that we now know for certain just On Sat, Sep 12, 2015 at 4:39 PM, Eleftherios Garyfallidis <
|
Okay so what is your suggestion. How to move forward with this? |
A few options (in order of preference, I think):
I can spend some time on option 1, but not before this Thursday. Even then, On Sat, Sep 12, 2015 at 4:44 PM, Eleftherios Garyfallidis <
|
Hi @arokem, The problem at least at my scipy 0.14 seems to be only with norm="euclidean_norm" Check my code snippet here
Now if you change to the default smooth (zero) you get some weird result looking Some other important points to improving the tests. I think those tests should use higher sampled spheres. We were using create_unit_hemisphere(2) and (3) which provide only 9 and 33 points respectively (too discrete). Also you will need to make sure that using hemispheres is a good idea for this type of interpolation. I am afraid that the points in the edges might create problems. So, I would use full spheres to be on the safe side. Finally, I noticed some another minor issue. In lines 550 and 552 we use So, in summary it seems that the problem may not be so serious and it can be resolved with a tiny bit of smoothing and less discrete spheres. So, if you can update the test I think we can move forward. At the same time it would be nice to have in our mind any new developments from the scipy devs. And give them feedback as we learn more from the behaviour of these functions. How does that sound? |
So what do you think? Should we enforce smoothing per default? Might be a I've made the following changes:
On Sun, Sep 13, 2015 at 4:20 PM, Eleftherios Garyfallidis <
|
Thanks for all the feedback, by they way! On Sun, Sep 13, 2015 at 7:20 PM, Ariel Rokem arokem@gmail.com wrote:
|
Recent changes in scipy use a different heuristic to find the epsilon parameter used for RBF interpolation, causing for us issue dipy#688. This should fix it, by using the old heuristic.
Looks grim...
Instead, warn that it will be deprecated in future versions. Additional changes in testing.
but that it still runs fine.
Great! All good here. But put in your TODO list (after Thursday) to update the api_changes.rst file by saying that the default parameter has changed and some norms will be deprecated. You should keep an issue open for scipy 0.16 if necessary. I will go ahead and merge this as it is now. That will make it easier to know which of the other PRs are failing for a good reason and not because of RBF. Oh and best of luck with your deadline. Thank you for looking into this. |
BF: Keep up with changes in scipy 0.16
I guess it's not too surprising that the Euclidean norm performed badly. This looks like a reasonable solution! |
Recent changes in scipy use a different heuristic to find the epsilon
parameter used for RBF interpolation, causing for us issue #688. This
should fix it, by using the old heuristic.