Centers and scales the columns of a matrix robustly for the purpose of covariance estimation.
scale_med(mat)
mat | A numerical matrix. |
---|
The input matrix with its columns centered and scaled.
Centers each column on its median, and scales each column by its median absolute deviation (MAD). If any column MAD is zero, its values become zero and a warning is raised. If all MADs are zero, an error is raised.