Probabilistic Principal Components Analysis. [VAR, U, LAMBDA] = PPCA(X, PPCA_DIM) computes the principal % component subspace U of dimension PPCA_DIM using a centred covariance matrix X. The variable VAR contains the off-subspace variance (which is assumed to be spherical), while the vector LAMBDA contains the variances of each of the principal components. This is computed using the eigenvalue and eigenvector decomposition of X.