Singular Value Decomposition (SVD) is a technique used in Recommender Systems to factorize a user-item interaction matrix into three lower-dimensional matrices. The goal is to find the user and item matrices, which can be used to make recommendations.
**Example:** Given a user-item interaction matrix, factorize it using SVD.
**Constraints:** The user and item matrices should have the same number of columns as the original matrix has rows.
Test Cases
Test Case 1
Input:
[[1, 2, 0], [0, 0, 3], [0, 1, 0], [1, 0, 0]]Expected:
[[0.5, 0.5, 0.5], [0.5, 0.5, 0.5], [0.5, 0.5, 0.5], [0.5, 0.5, 0.5]]Test Case 2
Input:
[[0, 1, 0], [1, 0, 1], [0, 1, 0], [1, 0, 1]]Expected:
[[0.5, 0.5, 0.5], [0.5, 0.5, 0.5], [0.5, 0.5, 0.5], [0.5, 0.5, 0.5]]+ 3 hidden test cases