Tim Davis from the University of Florida did a great job collecting a myriad of datasets, known as the The University of Florida Sparse Matrix Collection. As the fastcodesign guys say, http://www.fastcodesign.com/1662136/geeky-science-problems-double-as-works-of-art
Timothy Alden Davis, a computer, information science, and engineering professor at the University of Florida, is a sort of Eli Broad with a pocket protector. He’s got the largest open-source collection of sparse matrices in the world [...].
Sparse matrices can be represented as graphs, and this is what they look like using MATLAB/Octave to obtain static visualizations:
How do we map sparse matrices to weighted graphs? the algorithm for square matrices is straightforward: Given a square sparse matrix M = n x n, its corresponding graph G = (N, E) contains n nodes and the edge between nodes n1 and n2 is weighted as M[n1,n2]. If M[n1,n2] = 0, then there is no edge between nodes n1 and n2.
The interested reader may find more details at this link: Visualizing Sparse Matrices. In addition, there are a few academic references at the end of this post.
You can explore this data interactively using GraphInsight with 2D and 3D layouts. To export square sparse matrices from MATLAB/Octave to the DIMACS format (supported by GraphInsight), you can use the following function:
function sparse2dimacs(A,filename) fid = fopen(filename,'wt'); n=length(A); for i=1:n klen = length( nonzeros(A(i,[1:(i-1) (i+1):end])) ); fprintf(fid,'%d ( 0.0, 0.0 ) %d ',i, klen ); % find non zero elements of row i [p]=find(A(i,:)); for m=p if (i~=m ) fprintf(fid,'%d ',m); end end fprintf(fid,'\n'); end
In the following, we show some screenshots obtained from GraphInsight. We observe that these are screenshots from interactive 3D visualizations.
- The shallow_water matrix arise from weather shallow water equations (see http://www.icon.enes.org), from the Max-Plank Institute of Meteorology. The problem gives rise to an automatic differentiation problem. An iterative solver is used for the larger problem, but a direct sovler is used for finding the adjoints of a linear problem. The velocity field is integrated over a time loop with a semi-implicit method. The implicit part leads to a linear problem A*x=b, whose entries vary with time. This is a visualization done with GraphInsight which underlines the nodes degree-constantness.
Explore interactively your data with GrahInsight! download your evaluation copy at graphinsight.com. We support Microsoft Windows, Mac OS X, and Linux. Do not hesitate to contact us for any question or problem you may have with our product.
We are seeking for collaborations and work opportunities. Do not hesitate to contact Us at email@example.com.
- I. S. Duff, R. G. Grimes, and J. G. Lewis, Sparse Matrix Test Problems, ACM Transactions on Mathematical Software, vol. 15, no. 1. pp. 1-14, 1989, http://doi.acm.org/10.1145/62038.62043
- T. A. Davis, The University of Florida Sparse Matrix Collection, ACM Transactions on Mathematical Software (submitted, 2009), also available as a tech report at http://www.cise.ufl.edu/~davis/techreports/matrices.pdf