robust-pca
robust-pca copied to clipboard
Error in L1-norm implementation
There is a difference between the implementation of the L1-norm used (numpy norm with order 1), with the definition of L1-norm in the original paper. In the paper, the L1-norm of a matrix is defined as the sum of absolute values of all the elements (seeing the matrix as a long vector), which is different than numpy norm function. The following images show that.
original paper:
numpy:
This affects the value of mu
in the following piece of code:
self.mu = np.prod(self.D.shape) / (4 * np.linalg.norm(self.D, ord=1))
The matrix should be flattened before applying the numpy norm function in order to follow the paper.