I am working on sparse.csr.csr_matrix of size (4860x89462 sparse matrix of type '<class 'numpy.float64'>'with 9111761 stored elements) and using jupyter notebook 3.7.4
My requirement is to extract the top 2 results based on the Value of the elements in sparse matrix.
I am sharing one example of my sample sparse csr_matrix
Current Sparse matrix
(1, 1) 0.5
(1, 5) 0.66
(1, 6) 1.0
(2, 2) 1.0
(2, 3) 0.5
(2, 7) 0.33
Desired Sparse matrix
(1, 6) 1.0
(1, 5) 0.66
(2, 2) 1.0
(2, 3) 0.5
I am looking for solution which can work on huge matrix without taking much time.
Thanks in advance.