Giter Club home page Giter Club logo

eigenvectors-from-eigenvalues's Introduction

New Eigenvectors from Eigenvalues Calculation

This repository implements this paper that allows us to calculate eigenvectors from eigenvalues elegantly through PyTorch that allows your code to run on your CPU, GPU, or TPU.

Easily run it on your browser through Google Colab or copy the function locally.

Run Notebook on Google Colab

Open In Colab

Core Equation: Lemma 2

Lemma 2. The norm squared of the elements of the eigenvectors are related to the eigenvalues and the submatrix eigenvalues.

Mathjax of Lemma 2

$$| v_{i, j} | ^ 2 \prod_{k=1; k \neq i}^{n} (\lambda_i (A) - \lambda_k (A)) = \prod_{k=1}^{n - 1}  (\lambda_i (A) - \lambda_k (M_j))$$

Authors and Abstract

Peter B. Denton, Stephen J. Parke, Terance Tao, and Xining Zhang

We present a new method of succinctly determining eigenvectors
from eigenvalues. Specifically, we relate the norm squared of the elements of
eigenvectors to the eigenvalues and the submatrix eigenvalues.

Dependencies

  • PyTorch 1.9.1 (can be most versions of PyTorch as I used very core basic PyTorch functions)
  • Python 3.8 (doesn't matter much as I use basic operations)

Code Repository Citation

License

MIT

eigenvectors-from-eigenvalues's People

Contributors

ritchieng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

eigenvectors-from-eigenvalues's Issues

benchmark with scipy or numpy implementation?

Hey @ritchieng thanks for implementing this method so quickly! I am curious about the performance of this method comparing to other standard methods, implemented in scipy or numpy. Is it possible for us to see some benchmarking regarding this implementation?

Loss of eigenvectors' sign information

Hi! Thanks for this code.

I find that the sign information is lost when the original vector elements are recovered because square absolute operation makes every real the complex number positive.

Is there any way we can recover the original eigenvectors' signs also without using original eigenvectors.sign() (from PyTorch) * square root of eigenvectors (deduced from eigenvalues)? Because that'd be really helpful!

Regards
Rahul Bhalley

Repository Name

Repository name should be better "eigenvectors-from-eigenvalues".

Fast Version

TODOs

  • Vectorized deduction for lambda of matrix and lambda of submatrix
  • Numba no python (remove need for python interpreter) and fast

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.