Giter Club home page Giter Club logo

Comments (9)

yixuan avatar yixuan commented on May 24, 2024

I haven't written one yet, but will add one later since it should be easy.

from arpack-eigen.

skn123 avatar skn123 commented on May 24, 2024

Yixuan;
I think a sparse matrix support would be the first step as ARPACK is used primarily with large very large sparse matrices. Let me know if I can help / contribute in anyway. Actually, I like the code that you have shared. Maybe you should contact ggael and add it to the Official Eigen repo?

from arpack-eigen.

yixuan avatar yixuan commented on May 24, 2024

Hi @skn123 ,
I've just updated the code and there is now an example in the README file. Basically you just need to use the class SparseGenMatProd to wrap your sparse matrix, and all other part will be the same as before.

ARPACK-Eigen is still an immature project that has only a few months' development. When I think it's ready, I'll ask Gaël whether it deserves to be merged into Eigen. In either way, you can use this library in a neat way since it is header-only. :-)

from arpack-eigen.

skn123 avatar skn123 commented on May 24, 2024

Hi yixuan. Indeed, I did see that. One more point. If we are working with symmetric matrices, do we have to pass the full matrix or an upper triangular view would suffice?

from arpack-eigen.

yixuan avatar yixuan commented on May 24, 2024

At the current moment you need to pass the full matrix, if you use the built-in matrix wrappers. However, it's pretty straightforward to define your own matrix operation. See how easy it is to write the include/MatOp/SparseGenMatProd.h file.

Actually, you simply need to change the last line from
y.noalias() = mat * x;
to
y.noalias() = mat.selfadjointView<Eigen::Lower>() * x;
to force the matrix to be symmetric.

I'm considering how to make this procedure more intuitive and automatic.

from arpack-eigen.

skn123 avatar skn123 commented on May 24, 2024

Actually, I figured that out when I studied the code. I think the input matrix is constant and does not change. Thanks for the code. This is indeed great. Would it be also possible to add a JDQR version of this also? I think the ML community frequently use this or JDQR.

from arpack-eigen.

yixuan avatar yixuan commented on May 24, 2024

JDQR seems to be an interesting algorithm. If I understand correctly, it is another method to calculate partial eigen decomposition, similar to ARPACK. Is it correct?

from arpack-eigen.

skn123 avatar skn123 commented on May 24, 2024

Yes it is. Apparently, it is more stable (rather more stable than legacy ARPACK). Example would be this
https://github.com/jhaberstroh/cs294-davidson

from arpack-eigen.

yixuan avatar yixuan commented on May 24, 2024

Great. I'll take a look once I find time. Since JDQR is another issue, I would close this one first.

from arpack-eigen.

Related Issues (3)

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.