Linear Algebra, Mathematics, Math, Principal Component, Python.
nnz def pcp(X, maxiter=10, k=10): # refactored m, n = X.shape trans = m<n if trans: X = X.T; m, n = X.shape lamda = 1/np.sqrt(m) op_norm = norm_op(X) Y = np.copy(X) / max(op_norm, np.linalg.norm( X, np.inf) / lamda) mu = k*1.25/op_norm; mu_bar = mu * 1e7; rho = k * 1.5 d_norm = np.linalg.norm(X,