def main(): if len(argv) < 2: print "Usage: <num eigenvectors>" return k = int(argv[1]) A = get_udata_matrix() U, S, V = svd(k, 0.01, A) print "Frobenius norm:", frob_norm(A, U, S, V)
def main(): if len(argv) < 3: print "Usage: <num eigenvectors> <probability>" return k = int(argv[1]) p = float(argv[2]) A = rand_mat_30() A_bar = missing_entries(A, p) U, S, V = svd(k, 0.0001, A_bar) print "Frobenius norm:", frob_norm(A, U, S, V)