Git Product home page Git Product logo

eigenvaluemethods's Introduction

Comparison of Numerical Eigenvalue Approximation Methods

Power Method

The power method is an iterative method used to find the largest in magnitude eigenvalue of a linear system and it's corresponding eigenvector. Each iterative step takes O(N2) time.

Jacobi Method

The Jacobi method is an iterative method that can be used to find all eigenvalues and corresponding eigenvectors of a Hermitian matrix. It is based on the fact that orthogonal transformations on such a matrix do not change its eigenvalues, and hence these transformations can be iteratvely made in order to transform the matrix into a diagonal matrix in which the diagonal entries are the eigenvalues. The run time of a single iteration is O(N2).

Usage

There are two main programs in this project, eigen.py and tests.py. The former program contains the code for each iterative method listed above, and the latter contains the code to run the methods in the test cases found in the data directory, and visualizes the iterations. eigen.py can also be run on an individual matrix read from standard input.

  • eigen.py:

    python3 eigen.py [-h] [--jacobi]
    
    • -h => print usage information
    • –jacobi => use the Jacobi method (power method is the default)
  • tests.py:

    python3 tests.py [-t <threshold>] [-g] [-h] [-e] <test-number>
    
    • -h => print usage information
    • -t => the threshold for convergence of both algorithms (default 0.0001)
    • -g => generate a new test case and print to stdout
    • -e => print the test case in latex format
    • test-number => the number of the test case in the data directory

eigenvaluemethods's People

Stargazers

 avatar

Watchers

 avatar

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.