Top "Sparse-matrix" questions

A sparse matrix is a data structure in which not every entry is explicitly represented.

Populate a Pandas SparseDataFrame from a SciPy Sparse Matrix

I noticed Pandas now has support for Sparse Matrices and Arrays. Currently, I create DataFrame()s like this: return DataFrame(…

python numpy scipy pandas sparse-matrix
Improving a badly conditioned matrix

I have a badly conditioned matrix, whose rcond() is close to zero, and therefore, the inverse of that matrix does …

matlab matrix sparse-matrix matrix-inverse regularized
What is the fastest way to slice a scipy.sparse matrix?

I normally use matrix[:, i:] It seems not work as fast as I expected.

python numpy scipy sparse-matrix
Sparse matrix to a data frame in R

I have a sparse matrix Formal class 'dgCMatrix' [package "Matrix"] with 6 slots ..@ i : int [1:37674] 1836 2297 108 472 1735 1899 2129 2131 5 67 ... ..@ p : int [1:3417] 0 2 8 22 25 35 44 45 45 47 ... ..@ Dim : int [1:2] 3416 3416 ..@ Dimnames:List …

r matrix sparse-matrix
Create Sparse Matrix from a data frame

I m doing an assignment where I am trying to build a collaborative filtering model for the Netflix prize data. …

r machine-learning sparse-matrix
How to elementwise-multiply a scipy.sparse matrix by a broadcasted dense 1d array?

Suppose I have a 2d sparse array. In my real usecase both the number of rows and columns are much …

python numpy scipy sparse-matrix
How to make TF-IDF matrix dense?

I am using TfidfVectorizer to convert a collection of raw documents to a matrix of TF-IDF features, which I then …

python scikit-learn cluster-analysis sparse-matrix tf-idf
Access value, column index, and row_ptr data from scipy CSR sparse matrix

I have a large matrix that I would like to convert to sparse CSR format. When I do: import scipy …

python scipy sparse-matrix csr
Is sparse tensor multiplication implemented in TensorFlow?

Multiplication of sparse tensors with themselves or with dense tensors does not seem to work in TensorFlow. The following example …

sparse-matrix tensorflow
Calculating inverse of a very large matrix

I am trying to calculate inverse of a very large matrix (11300x21500) in C++. So far I have tried Eigen …

c++ sparse-matrix matrix-inverse