-
Notifications
You must be signed in to change notification settings - Fork 106
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
Weight computation for scaled interpolation #479
Comments
All scale interpolation does is scale the input: Interpolations.jl/src/scaling/scaling.jl Lines 102 to 108 in af35e77
It does not change the weights. |
The scale function stretch the x-axis of the interpolation. Therefore, the weights are dependent on the scale because the weights are dependent on the x-axis of the interpolated function.
The itp_scale is: |
Are you asking how it currently works or are you suggesting an improvement? |
I am tying to confirm that I understand how it works because, to me, it doesn't seem to work properly with an itp scaled by a If you agree with this, I would ask if there is any way of computing the weighted indexes of a scaled interpolation. If not, I am suggesting an improvement. |
Correct. The underlying Interpolation has no idea it is being scaled. What you would want to do is implement additional methods on ScaledInterpolation directly. |
I am interested on the weights as I need to calculate an interpolation based on a (very sparse) matrix. This matrix is constructed based on the weights. For my application, it would be good to have a public interface of the weights that would work for any interpolation. Do you feel that such interface could be useful to more people? Or do you feel that the application of such interface is too small and might not be worth? |
It is possible. What would be the most consistent way to calculate the scaled weights from non-scaled weights? Would you be interested in submitting a pull request to implement |
Sure, I think that something like this should work nicely:
What do you think? |
This roughly looks fine to me. Could you turn this into a pull request? |
I ran a few tests for the algorithm and it does not work for |
I would be interested in this as well. My use case is that I want to find the contributing points and their weights, so I don't need |
Hello,
I am working with Interpolations.jl and I am using the weight computation feature. However, the results are not what I was expecting. This code works fine if the interpolation is not scaled but it is not correct due to the scale step. Is it possible to calculate the weight for a scaled interpolation? Or does the weight calculation interface works differently than this with a scaled interpolation?
Thanks
The text was updated successfully, but these errors were encountered: