KarhunenLoeveDecomposition gives the Karhunen-Loeve transform of the numerical arrays and the transformation matrix m, returning the result in the form .
The total variance of the is the same as the total variance of the .
The are given in order of decreasing variance.
The rows of the transformation matrix m returned by KarhunenLoeveDecomposition are the eigenvectors of the covariance matrix formed from the arrays .
KarhunenLoeveDecomposition effectively computes the inverse Karhunen-Loeve transformation. If the length of is less than the size of m, missing components are assumed to be zero.