Comments (9)
Returning opnorm(Array(A))
silently and by default might be really bad because of massive memory consumption, and should be done consciously by the user. I think that's the rationale for the error message.
from sparsearrays.jl.
Otherwise one could argue, that there is no need for sparse arrays in
stdlib
at all, why not use an external package for that?
I very much want to move sparse arrays out of stdlib.
from sparsearrays.jl.
Not sure I understand. You mean implementing the opnorm
? We should implement it all in this package for now.
from sparsearrays.jl.
@dkarrasch I agree, silently returning opnorm(Array(A))
is not a good solution.
But what are Julia's plans to resolve this issue? To resolve this issue in Julia, I assume we would need to have something like a Lanczos Bidiagonlization algorithm implemented. Is this the way to go or rather out-of-scope and should be kept in external Julia packages?
from sparsearrays.jl.
I'm no authority here, but I guess this is a bit out of scope to provide one standard way to do it. You could proceed as you said, compute the topmost singular value. Now here is exactly the point: which method/implementation do you want to use? I'm not sure one can solve that by means of stdlib-functions (which kind of implies that this is not going to be done in SparseArrays
). You could use Arpack.jl
, or perhaps something from IterativeSolvers.jl
, or TruncatedSVD.jl
. In fact, you may even appreciate the fact that you can choose a tailored package to solve your specific problem...
from sparsearrays.jl.
Since sparse matrices are part of stdlib
, shouldn't they be as feature-complete as dense arrays?
It is currently possible to solve linear systems A * x = b
where A
is a sparse matrix. I took a quick look at the code, and it seems to use LU factorization to achieve that. Although this is not the preferred way to solve such problems in many real-world applications, the Julia standard library offers a solution that can be good enough for many use cases. This does not mean that it is the only way to solve such a linear system of equations, it's just the way that the Julia standard library provides. So in my opinion, the Julia standard library should provide a feature-full implementation of sparse arrays, which includes an implementation of SVD, opnorm(A, 2)
, rank
, etc.
Otherwise one could argue, that there is no need for sparse arrays in stdlib
at all, why not use an external package for that?
It would be really interesting to hear the opinions from several Julia maintainers.
from sparsearrays.jl.
Interesting.
I guess having SparseArrays
in a separate package would make it much easier to add features (like SVD, solving linear systems with an iterative solver (maybe by using something from IterativeSolvers.jl
), adding more common matrix decompositions).
On the other hand, sparse matrices are a fundamental data structure which are used in many different applications. Not having them in the standard library would probably worsen the Julia out-of-the-box experience for many users...
from sparsearrays.jl.
There are lots of packages that have fantastic experience for users. I think users will be better served with a faster moving sparse matrix package that lives outside, where capabilities can be added quickly, and new experiments can be carried out.
We'll move Sparse and SuiteSparse out whenever the stdlib versioning stuff is figured out.
from sparsearrays.jl.
@ViralBShah is this out of scope for SparseArrays even once we move it out?
from sparsearrays.jl.
Related Issues (20)
- Loads of warnings about method redefinitions HOT 2
- Wrapper generator needs updating to pick SuiteSparse headers from new location HOT 1
- Single precision support in CHOLMOD HOT 3
- Cholesky F.PtL \ Av where Av is a view does not work HOT 1
- Base.stack is underperforming for SparseArrays HOT 3
- Regression in invalidations caused by SparseArrays HOT 3
- Elementwise multiplication by a view of a dense matrix gives a dense matrix
- `findmin(A; dims=1)` is much slower than manually looping over. HOT 1
- Sparse array of string types HOT 17
- Memory Mapped SparseArrays HOT 3
- Extra allocations when using generalized `mul!` operation
- Attempting to run sparse `qr` produces StackOverflow when run on a sparse matrix of `ForwardDiff.Dual`. HOT 6
- Inconsistent addition between sparse and dense HOT 1
- `ldiv` of `LUFactorization` can throw `SingluarException` HOT 1
- Thread-safe dropstored! HOT 1
- Merge SparseMatricesCSR.jl in HOT 2
- Support zero-based indices HOT 3
- Windows threading tests fail in GitHub Actions CI but pass in Buildkite CI
- Problem when running old benchmarks in Oceananigans HOT 6
- Sparse matrix format interfaces HOT 2
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 sparsearrays.jl.