I am trying to calculate a cosine similarity using Python in order to find similar users basing on ratings they have given to movies. As it can be expected there are a lot of NaN values. I am using movie dataset from Kaggle.
When I use np.dot() on two nd.arrays the outcome is:'nan'. I have checked with np.nansum() that there are some other than 'nan' values.
I do not want to change all 'nan' values to '0' as it would mean that users have given 0 rating to the movies which lead to 'false' similarity between users.
Please, give me some advice regarding how to proceed with this problem.
Thanks in advance.