Giter Club home page Giter Club logo

Comments (7)

haampie avatar haampie commented on June 2, 2024

Thanks!

I have to figure lanczos out, but if I remember correctly some articles advocate using Arnoldi even in the case of symmetric / Hermitian matrices, because of stability. Is Arnoldi too slow for your use case?

from arnoldimethod.jl.

snirgaz avatar snirgaz commented on June 2, 2024

Thanks for the quick response. Admittedly, I am not an expert in numerical matrix algebra but only a user of ARPACK for diagonalizing quantum many-body Hamiltonians (hermitian and sparse matrices). Intuitively, Lanczos uses the information about the symmetric/hermitian structure of the matrix so that supposedly there could only be some gain. But I might be mistaken. I can try testing (speed/correctness) your package for some of my use cases.

from arnoldimethod.jl.

jarlebring avatar jarlebring commented on June 2, 2024

In my experience the real advantage of Lanczos comes from a reduction of memory usage. It comes at cost of numerical stability as haampie points out. Once one eigenvalue converges cancellation effects will come in and lessen the accuracy of the other eigvals. On the other hand, in most engineering applications full precision is not needed.

from arnoldimethod.jl.

snirgaz avatar snirgaz commented on June 2, 2024

Even just for the memory it would be nice to have.

from arnoldimethod.jl.

jarlebring avatar jarlebring commented on June 2, 2024

I would propose to add support this by making Arnoldi and abstract class and let

struct FullArnoldi{T,TV<:StridedMatrix{T},TH<:StridedMatrix{T}} <: Arnoldi
    V::TV 
    H::TH
...

be the standard behavior, and define a new class which only stores the recent vectors

struct Lanczos{T,TV<:StridedVector{T},TH<:StridedMatrix{T}} <: Arnoldi
    v0::TV 
    v1::TV 
    v2::TV 
    H::TH

The expansion could then easily be handled with dispatch:
Arnoldi:

function iterate_arnoldi!(A, arnoldi::FullArnoldi{T}, range::UnitRange{Int}) where {T}

and Lanczos

function iterate_arnoldi!(A, arnoldi::Lanczos{T}, range::UnitRange{Int}) where {T}

from arnoldimethod.jl.

jarlebring avatar jarlebring commented on June 2, 2024

On second thought, there is a decision to made here. 1) The implicitly restarted Lanczos as described in the eigenvalue templates http://www.netlib.org/utk/people/JackDongarra/etemplates/node118.html does not have the advantage of reduced memory, since one needs to store the whole basis to do the restart. It does reduce the orthogonalization CPU-time. 2) If one only wants eigenvalues (not eigenvectors) and do not use restart, one can get the reduced memory advantage. 3) Another solution is to use double sweeps, which would double the computation cost, but have the reduced memory. Support for 1), 2) or 3)? Or all of them?

from arnoldimethod.jl.

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.