haifengl / smile

Statistical Machine Intelligence & Learning Engine
https://haifengl.github.io
Other
6.05k stars 1.13k forks source link

[FEATURE PROPOSAL] ARPACK wrapper functions #742

Closed Daniel63656 closed 1 year ago

Daniel63656 commented 1 year ago

Hi, I work on a research project in computer vision and found myself needing to calculate only one eigenvalue of a large but sparse matrix to solve a homogeneous linear system of equations. As a result I coded a small code base that wraps around arpack-ng's functions and provides user friendly functions that act similar to matlabs or skicits eigs()/eigsh(). Standard, general, shift-invert, buckling and cayley mode are all supported.

Right now I use la4j as matrix interface for the functions because it comes with sparse matrices and an MIT licence. Because I may want to use my code commercially in the future, I am kind of hesitant to switch to smiles matrices, despite clearly being the better choice.

Does being a contributor grant me a commercially usable licence of smile? If so I would like to fully integrate my arpack wrapper functions into the smile ecosystem. Maybe we can come to an agreement. Looking forward to hear from you.

haifengl commented 1 year ago

Thank you very much for the consideration. Smile has integrated with ARPACK for both dense and sparse matrices. When you calculate a few eigen vectors, it will call ARPACK. And our sparse matrix implementation is very efficient. You will find it much faster than la4j.

Daniel63656 commented 1 year ago

Does smile handle all the reverse communication and arpack function calling or does it have wrapper functions for ease of use? Also, openBLAS only works for dense matrices right? Do you also use natively accelerated functions for sparse matrices or just for dense ones?