Last update: May 2017.
- Nuclear norm minimization (Candes and Recht 2009)
- Singular value thresholding (Cai, Candes, and Shen 2010)
- Alternating least squares (Hu, Koren, and Volinsky 2008)
- Biased alternating least squares (Paterek 2007)
import numpy as np
from matrix_completion import nuclear_norm_solve, calc_unobserved_rmse
U = np.random.randn(20, 5)
V = np.random.randn(15, 5)
R = np.random.randn(20, 15) + np.dot(U, V.T)
mask = np.round(np.random.rand(20, 15))
R_hat = nuclear_norm_solve(A, mask, mu=1.0)
print("RMSE:", calc_unobserved_rmse(U, V, R_hat, mask))
This library is available under the Eclipse Public License.