Rescales matrix so that each column has a mean of 0 and a standard deviation of 1.
The original matrix is overwritten in place. The function returns the means and standard deviations of each column used to rescale it.
Usage
scale_mat_inplace(M)
Value
Returns a matrix of size (2 x m). The first row contains the column means. The second row contains the column standard dveiations. NOTE: The original matrix, M, is overwritten.
Arguments
M
matrix of data (n x m)
Details
The key advantage of this method is that it can be applied to very large matrices without having to make a second copy in memory and the original can still be restored using the saved information.