Comments (3)
Thanks for raising the issue. If you don't specify your symeig method, it will be defaulted to exact eigendecomposition, i.e. using the algorithm below:
xitorch/xitorch/_impls/linalg/symeig.py
Lines 27 to 44 in aaee1ed
Where it basically computes all the eigenvalues and just keep 100 of them.
There is another algorithm we implemented which is
davidson
, but not being used extensively, so it might fail.You can try it by specifying
xitorch.linalg.symeig(..., method="davidson")
.If Davidson's method does not work, another option is to implement
LOBPCG
method, which we might be able to implement.from xitorch.
@mfkasim1 Thank you for the quick response! I did try to use the "davidson" method. However, the performance semms to be much worse than the default method out of the box. For a matrix size of 4500x4500, the default method took about 8 seconds, while the "davidson" method took close to 10 minutes for 20 eigenpairs (and 2.5 minutes for 1 eigenpair). I also noticed much higher CPU load when using the "davidson" method. I wonder if there's any tweaking that I can do to this method to make it faster...
For the LOBPCG
method, do you think it can reach performance on par with packages like scipy, especially for sparse matrices? I'm curious if you have any plans to implement it "soon" ... I hope I could attempt to do it myself, but I assume it must be very difficult for someone who doesn't know the internals of PyTorch and is not very math-savvy.
from xitorch.
If you'd like, you can make a PR for it. Pytorch already has torch.lobpcg
, so you even might be able to use it instead of xitorch (it just don't provide backward for non-zero M
matrix). Another alternative is to add lobpcg
in xitorch, but under the hood, it will use torch.lobpcg
, and xitorch can provide the backward.
from xitorch.
Related Issues (18)
- `torch.outer` is not yet present in pytorch HOT 1
- Incompatibility with pytorch 1.10 HOT 3
- Rootfinder fails with a simple case
- A RuntimeError occur when call _Jac.fullmatrix() HOT 2
- gradient-vector product and vector-gradient product for higher-order gradients
- Cannot install from sdist obtained from PyPI HOT 1
- Custom termination criterion for nonlinear solver HOT 2
- Interpolate module to-do list
- Status Badges issues
- Using root finder to solve a inverse function with the NN form Error HOT 1
- Linear algebra module to-do list HOT 1
- Integrate module to-do list
- Optimize module to-do list HOT 1
- Example 2 broken HOT 1
- Joint eigenvalues of a pair of matrix HOT 11
- Complex hermitian matrices not recognized as hermitian. HOT 2
- Spurious results if x input is not sorted in interpolate.Interp1D HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xitorch.