-
Notifications
You must be signed in to change notification settings - Fork 23
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
Optimization of the parameters #22
Comments
Hi Paul, You could try to increase the maximum number of levels in the MBA hierarchy ( https://github.com/ddemidov/mba/blob/master/mba/mba.hpp#L728 If you know the shape of the background trend, you could provide it to the constructor as Each new level in the MBA hierarchy tries to approximate the delta between the target points and the results of the previous levels. When you provide a decent initial approximation, MBA has less work to do. |
On the other hand, if smootheness is more important than precision, you could try decreasing the |
Thanks for your suggestion. I had been using pilot version of your code so far, and it ran pretty well without any installation, using the C-code provided in readme. Could you tell me, what's required for the compilation process, for the changes you suggested me to make. I saw a setup.py file in the home directory, and tried running using python/3.6. It tried to make changes to one of the python packages in a read-only directory of the supercomputer I am working on. _python setup.py install The following error occurred while trying to add or remove files in the
I see the code is written in C, and header files also have no calls to any python libraries. I understand all of the python related part is in the pybind11. Are you using/calling any python functions? If yes, could you tell me the compilation process of this routine? Thanks in advance, |
If you work in C++, you don't need to compile the python wrapper. The MBA class constructor has some optional arguments with default values, you just need to specify those: // Algorithm setup.
mba::MBA<2> interp(lo, hi, grid, coo, val, /*max_levels=*/ 5, /*tol=*/ 1e-3, /*min_fill=*/0.5, /*initial=*/[](double a){ return 0;}); |
Hello Mr. Demidov,
I have opened a new issue as per your suggestion.
As mentioned in my previous request, I am trying to do smooth interpolation of a function from a 3-D scattered dataset (10^4 points) to a 3-D regular set of grid points (10^6 points). (1) The top-left figure is my scattered dataset, and as you can see there is no anisotropy in the dataset. (2) The top-right is the target-values I am trying to achieve, i.e. when you compute the actual function on each regular grid points. (3) The bottom figure is the difference plot between the values interpolated from the scattered grid (m= [3, 3, 3]) and target values on the regular grid.
As you can see, in spite of the smoothening, I have some discontinuities/inaccuracies in the dense region as well as sparse region. Is there a way to optimize or avoid this? I have seen your link in my previous answer, and I would like to know what parameters other than "grid=[m, m, m]" can I play with in this implementation. The reason I need a smooth interpolation is because, I will have to apply double derivative operator upon the interpolated function to arrive to my actual result. So, even though the differences seem small, it will get ramified in my final answer.
Thanks in advance,
Paul
The text was updated successfully, but these errors were encountered: