Last active
January 21, 2017 14:31
-
-
Save Wann-Jiun/8e0c7169ba60be99bb7c1019bb78b8e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
similarity_user = train_matrix.dot(train_matrix.T) + 1e-9 | |
norms = np.array([np.sqrt(np.diagonal(similarity_user))]) | |
similarity_user = ( similarity_user / (norms * norms.T) ) | |
similarity_movie = train_matrix.T.dot(train_matrix) + 1e-9 | |
norms = np.array([np.sqrt(np.diagonal(similarity_movie))]) | |
similarity_movie = ( similarity_movie / (norms * norms.T) ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment