Skip to content

Conversation

@Benedict-Y
Copy link
Collaborator

删除了一些main冗余的注释。然后改了SVD,加速运行。改了评估,加速运行,改了一些小的导入包的问题

@Benedict-Y Benedict-Y requested a review from Copilot April 5, 2025 03:31
@Benedict-Y Benedict-Y added the enhancement New feature or request label Apr 5, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 17 out of 18 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • data/ml-1m/README: Language not supported

self.similarity_matrix = similarity.cpu().numpy()

# 确保对角线上是1.0(自己与自己的相似度)
np.fill_diagonal(self.similarity_matrix, 1.0)
Copy link

Copilot AI Apr 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code uses 'np.fill_diagonal' but there is no corresponding import for numpy. Please add 'import numpy as np' at the top of the file.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually we have added

@Benedict-Y Benedict-Y requested a review from Copilot April 5, 2025 03:34
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 17 out of 18 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • data/ml-1m/README: Language not supported
Comments suppressed due to low confidence (1)

src/models/user_cf.py:88

  • The code uses 'np' (numpy) but numpy is not imported. Please add 'import numpy as np' at the top of the file to avoid runtime errors.
self.similarity_matrix = np.zeros((n_users, n_users))

Copy link
Collaborator Author

@Benedict-Y Benedict-Y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

self.similarity_matrix = similarity.cpu().numpy()

# 确保对角线上是1.0(自己与自己的相似度)
np.fill_diagonal(self.similarity_matrix, 1.0)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually we have added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants