Questions relating to sparse matrix algorithms and data structures, along with questions about implementation and analyses.
0
votes
1answer
25 views
Query regarding cusparseSolveAnalysisInfo_t
I need to solve Ax=B multiple times and cusparseSolveAnalysisInfo_t is taking huge time inside the loop.
What does cusparseSolveAnalysisInfo_t do in the solution of AX=B?
According to the ...
1
vote
1answer
31 views
Calculate Similarity of Sparse Matrix
I am using Python with numpy, scipy and scikit-learn module.
I'd like to classify the arrays in very big sparse matrix. (100,000 * 100,000)
The values in the matrix are equal to 0 or 1. The only ...
0
votes
3answers
29 views
nonzero elements of sparse Matrix
let's say I have a big Matrix X with a lot of zeros, so of course I make it sparse in order to save on memory and CPU. After that I do some stuff and at some point I want to have the nonzero elements. ...
0
votes
0answers
43 views
Ideal classifiers in python to fit sparse high dimensional features (with hierarchical classification)
This is my task:
I have a set of hierarchical classes (ex. "object/architecture/building/residential building/house/farmhouse")--and I've written two ways of classifying:
treating each class ...
0
votes
1answer
12 views
Sparse Matrix file format and conversion
Are there any libraries in C/fortran which can read different sparse storage file formats i.e. matrix market format, rutherford boeing , howell boeing format and convert from one format to another.
...
0
votes
1answer
37 views
Memory efficient small eigenvalue algorithms for sparse matrices
I am writing some Java software which requires calculating eigenvalues and eigenvectors of positive definite symmetric sparse matrices. I don't need all of the eigenvalues, but I'm mostly interested ...
1
vote
1answer
25 views
cuSPARSE dense times sparse
I need to calculate the following matrix math:
D * A
Where D is dense, and A is sparse, in CSC format.
cuSPARSE allows multiplying sparse * dense, where sparse matrix is in CSR format.
Following a ...
0
votes
0answers
18 views
Sum up elements in matrix arraylist
I am trying to sum up each arraylist within an arraylist. I am assuming you use the get method. but I am not sure how to do this exactly. This is what I have so far. As indicated by the arrows is were ...
6
votes
1answer
81 views
When writing an R package that uses the Matrix package, why do I have to specify Matrix::t() instead of just t()?
Consider the following simple functions defined in an R session:
nathanvan@nathanvan-N61Jq:~$ R
R version 3.0.1 (2013-05-16) -- "Good Sport"
... snip ...
> make.a.Matrix <- function(data, ...
0
votes
1answer
11 views
Why is spdiag deprecated in Octave, but not speye?
I've noticed that spdiag is deprecated, but not speye. Why is this? Both diag and eye generate diagonal matrices, so shouldn't speye be unnecessary as well (or at least exactly as unnecessary as ...
1
vote
1answer
37 views
cuda sparse operations in CSC format
I've been looking to use cuSPARSE to multiply a sparse matrix by a dense matrix.
My sparse matrix is in CSC (Compressed Sparse Column Format).
cuSPARSE supports conversion from CSC to CSR, and the ...
1
vote
1answer
41 views
In R how do you write a sparse matrix to a file?
I have a sparse matrix A, generated as an output of glmnet function.
When I print the matrix A, it shows all the entries and at the top it reads -
1897 x 100 sparse Matrix of class "dgCMatrix"
...
1
vote
2answers
54 views
Create Sparse Matrix with Coordinate Storage System?
I am writing a java program which involves working with a 1058 X 1058 matrix containing float values. This matrix contains many zero values and so I need to store this as a sparse matrix and later use ...
1
vote
2answers
38 views
sparse matrix parallel to the full matrix syntax of A(ind,ind)=1 in Matlab
In Matlab I can populate all combinations of elements in a full matrix by doing the following:
A=zeros(5);
ind=[1 4 5];
A(ind,ind)=1
A =
1 0 0 1 1
0 0 0 0 ...
1
vote
0answers
24 views
The fastest way to calculate eigenvalues of large matrices
Until now I used numpy.linalg.eigvals to calculate the eigenvalues of quadratic matrices with at least 1000 rows/columns and, for most cases, about a fifth of its entries non-zero (I don't know if ...
1
vote
0answers
43 views
Denormalise the data using Pandas
If I have data of the following format (stored in a pandas dataframe), essentially a normalised form of categories and wares to a slug:
pandas.DataFrame:
categories ...
3
votes
2answers
49 views
How to calculate (1 - SparseMatrix) of a huge sparse matrix?
I researched a lot on this but couldn't find a practical solution to this problem. I am using scipy to create csr sparse matrix and want to substract this matrix from an equivalent matrix of all ones. ...
2
votes
3answers
82 views
What is a fast simple solver for a large Laplacian matrix?
I need to solve some large (N~1e6) Laplacian matrices that arise in the study of resistor networks. The rest of the network analysis is being handled with boost graph and I would like to stay in C++ ...
0
votes
0answers
21 views
Sparse Matrix in R with categorical attributes and transaction id
I'm working with Association Rules and should create a sparse matrix in R.
I install the arules package which have read.transactions() function.
The problem is the following: I have data with the ...
-3
votes
1answer
39 views
Sparse LU with Partial Pivoting [closed]
I would like to perform LU decomposition with partial pivoting on a sparse matrix.
It seems that full pivoting is very fast and efficient for sparse matrices and the partial is not efficient for ...
5
votes
1answer
76 views
R: sparse matrix conversion
I have a matrix of factors in R and want to convert it to a matrix of dummy variables 0-1 for all possible levels of each factors.
However this "dummy" matrix is very large (91690x16593) and very ...
0
votes
1answer
26 views
octave very slow when constructing word-sentence matrix
I have a vocabulary (vector of strings) and a file full of sentences. I want to construct a matrix that shows how often each sentence contains each word. My current implementation is dreadfully slow ...
0
votes
1answer
31 views
how to equalise the columns of two sparse matrices
I've got two sparse matrices, for a training and test set, and I need to remove columns in each that are not in the other - making the columns the same in both. At the moment I'm doing so with a loop, ...
2
votes
3answers
67 views
Random binary matrix with two non-trivial constraints
I need to generate a random matrix of K columns and N rows containing ones and zeroes, such that:
a) Each row contains exactly k ones.
b) Each row is different from the other (combinatorics imposes ...
0
votes
0answers
66 views
cuda dense times sparse
How do I do dense times sparse matrix multiplication using CUDA (cuSparse)?
I'm using cuSparse library v5.0 and I need matrix multiplication C=A*B for the case when A is dense and B is sparse.
...
0
votes
3answers
38 views
sparse matrix library for C++
Is there any sparse matrix library that can do these:
solve linear algebraic equations
support operations like matrix-matrix/number multiplication/addition/subtraction,matrix transposition, get a ...
0
votes
0answers
26 views
Explain extractFeatures() from the NMF package in R
I am using the R package NMF to perform non-negative matrix factorization on microarray expression data. I finished the nmf procedure fine, but would like to extract the gene names (features) from the ...
3
votes
2answers
36 views
How to define a (n, 0) sparse matrix in scipy or how to assemble a sparse matrix column wise?
I have a loop that in each iteration gives me a column c of a sparse matrix N.
To assemble/grow/accumulate N column by column I thought of using
N = scipy.sparse.hstack([N, c])
To do this it ...
-1
votes
1answer
16 views
Algorithm for Matrix Inverse in MATLAB
I have a 10000*10000 (matrix A) sparse matrix containing only 5 non-zero elements in each row.
Now the problem is that the diagonal elements and the constants (in B matrix s.t. AX=B) get updated ...
0
votes
0answers
27 views
Method to solve sum with sparse matrices
I am currently implementing the Modified Adsorption semi-supervised algorithm from Talukdar.
In the algorithm I need to perform a sum of the following kind:
D_v = sum_u ( (Pc_v * W_vu + Pc_u * ...