GithubHelp home page GithubHelp logo

Comments (4)

yuki-koyama avatar yuki-koyama commented on May 23, 2024

The RBF implementation in this library relies on a "direct" linear system solving, which is done by LU decomposition and takes more than O(n^2). Having 16,000 points means the size of the linear system is 16,000, which is infeasible for the direct approach.

https://yuki-koyama.github.io/mathtoolbox/rbf-interpolation/

This issue is well known, and [Carr et al. 2001] also pointed it out at the end of Section 3. Such large problems need an approximation approach; e.g., [Carr et al. 2001] uses the Fast Multipole Method (FMM), which takes only O(N log N) to solve the system.

[Carr et al. 2001]: Reconstruction and representation of 3D objects with radial basis functions. https://dl.acm.org/doi/abs/10.1145/383259.383266

from mathtoolbox.

Another-Anonymous-User avatar Another-Anonymous-User commented on May 23, 2024

Thanks for the fast reply! I probably should have been a bit more specific. The use of the LU decomposition approach would naturally affect the speed of the construction of the interpolation model but not of a query on it. While the construction may take a bit that's fine for me as it only needs to be done once. The slow part that is actually becoming a bottleneck for me is when I make a query for an output, i.e. use CalcValue(x) which I think is essentially involves vector matrix multiplications.

from mathtoolbox.

yuki-koyama avatar yuki-koyama commented on May 23, 2024

Thanks for the clarification. CalcValue(x) takes O(N), so the more data points you have, the longer it takes.

I just updated CalcValue(x) in #74, which makes it roughly 5x times faster than before (I measured the performance with 2000 data points with 1000 evaluations).

If further performance is necessary, a possible solution would be to use the technique described in Section 5 of [Carr et al. 2001]. It is about a data point reduction; the reduction itself takes much extra time, but once the reduction is done, the interpolated value calculation will be drastically faster. Hope this helps you.

from mathtoolbox.

Another-Anonymous-User avatar Another-Anonymous-User commented on May 23, 2024

Thank you so much! I will try it out and see how it performs for my case.

from mathtoolbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.