Code Monkey home page Code Monkey logo

Comments (4)

wo80 avatar wo80 commented on August 10, 2024

The Q of SparseQR is not the actual Q matrix, but it stores the Householder vectors. Take a look at the ApplyHouseholder method at SparseQR.cs#L172. You will also have to take the beta array into account for your computation.

from csparse.net.

wo80 avatar wo80 commented on August 10, 2024

As already mentioned here, the whole procedure of explicitly computing Q will be very inefficient!

from csparse.net.

wo80 avatar wo80 commented on August 10, 2024

BTW: Francis algorithm isn't meant for sparse matrices, it usually produces complete fill-in. Though the QR method is part of sparse eigenvalue algorithms like Lanczos or Arnoldi, it operates only on a small part of the spectrum (since usually only a few eigenvalues are requested).

from csparse.net.

wo80 avatar wo80 commented on August 10, 2024

So here's a quick test I did, showing the sparsity of the involved matrices and the time to compute the factorization and to compute the actual Q:

// Column ordering: natural
N =  100: A  4.6% , H 10.1% , R 18.3% , Q 59.6%, fac time:   0ms, Q time:    12ms
N =  200: A  2.4% , H  7.2% , R 13.4% , Q 56.9%, fac time:   1ms, Q time:    78ms
N =  400: A  1.2% , H  5.0% , R  9.5% , Q 54.9%, fac time:   2ms, Q time:   662ms
N =  800: A  0.6% , H  3.6% , R  6.9% , Q 53.5%, fac time:   8ms, Q time:  4962ms
N = 1600: A  0.3% , H  2.5% , R  4.9% , Q 52.5%, fac time:  28ms, Q time: 43323ms

// Column ordering: minimum degree A'A
N =  100: A  4.6% , H  8.4% , R 14.2% , Q 37.4%, fac time:   0ms, Q time:     8ms
N =  200: A  2.4% , H  5.6% , R  9.7% , Q 29.6%, fac time:   1ms, Q time:    40ms
N =  400: A  1.2% , H  3.5% , R  6.2% , Q 21.7%, fac time:   2ms, Q time:   238ms
N =  800: A  0.6% , H  2.2% , R  3.9% , Q 17.8%, fac time:   5ms, Q time:  1579ms
N = 1600: A  0.3% , H  1.3% , R  2.4% , Q 12.8%, fac time:  15ms, Q time: 10655ms

Edit: the matrix A is the standard 2d Laplacian

from csparse.net.

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.