I am using Python to do cosine similarity.
similarity_matrix = cosine_similarity(tfidf_matrix)
The problem is that I am getting this error
MemoryError: Unable to allocate 44.8 GiB for an array with shape (6011226750,) and data type float64
I don't think I need float64 for this operation as 2 digits after the decimal point should be enough.
Is there a way I can change the cosine_similarity
data type to a smaller one?