Coder Social home page Coder Social logo

Memory management about kknn HOT 4 CLOSED

klausvigo avatar klausvigo commented on June 14, 2024
Memory management

from kknn.

Comments (4)

KlausVigo avatar KlausVigo commented on June 14, 2024

Hello Timo @grssnbchr,

kknn constructs internally 2 distance matrices which have dimension q * k (* 4 / 8 byte) which will be the bottle neck.
You should be able to subsets of dialects_test to kknn and just combine the results in the end, you can even compute these on different machines.
Also kernel="rectangular" may gives very similar results for a smaller choice of k, as the contribution from far away (distance wise) speakers to the estimate will be low.
If you can send me some sample data I may can find some more parts to improve.

Have a nice weekend
Regards,
Klaus

from kknn.

grssnbchr avatar grssnbchr commented on June 14, 2024

Thanks a lot for your fast reply. I quickly thought about splitting the raster but then I thought the results wouldn't match and rejected the idea. Buut - of course - if always the same training data set is taken, the tiles fit nicely together (i.e. ==> not split the training data set, too). Doing it that way, the memory problems vanish. Also, somehow, the whole computation if faster by about 10-20%. And what's even better: I can now use the foreach package to do parallel processing and gain another 30-40% of computation time. So thanks a lot. Once I have this all together, I will write a blog post and gladly point out your package and your help!
Timo

from kknn.

grssnbchr avatar grssnbchr commented on June 14, 2024

And here's that post - finally: https://timogrossenbacher.ch/2018/03/categorical-spatial-interpolation-with-r/
Thanks again!

from kknn.

KlausVigo avatar KlausVigo commented on June 14, 2024

@grssnbchr Looks amazing! Glad I could help

from kknn.

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.