I'm trying to calculate cosine similarity of a sparse matrix
<63671x30 sparse matrix of type '<class 'numpy.uint8'>'
with 131941 stored elements in Compressed Sparse Row format>
The thing is I used scikit-learn's cosine_similarity
function but I got this error:
memoryError: Unable to allocate 29.7 GiB for an array with shape (3984375099,) and data type float64
I googled the error where I was suggested to increase the size of the paging file, but after doing it my PC just freezes and I have to force shutdown and reboot. Is there any way to overcome this?