11.7.1. astroML.dimensionality.iterative_pca

astroML.dimensionality.iterative_pca(X, M, n_ev=5, n_iter=15, norm=None, full_output=False)[source]
X: ndarray, shape = (n_samples, n_features)

input data

M: ndarray, bool, shape = (n_samples, n_features)

mask for input data. where mask == True, the spectrum is unconstrained

n_ev: int

number of eigenvectors to use in reconstructing masked regions

n_iter: int

number of iterations to find eigenvectors

norm: string

what type of normalization to use on the data. Options are - None : no normalization - ‘L1’ : L1-norm - ‘L2’ : L2-norm

full_output: boolean (optional)

if False (default) return only the reconstructed data X_recons if True, return the full information (see below)

X_recons: ndarray, shape = (n_samples, n_features)

data with masked regions reconstructed

mu: ndarray, shape = (n_features,)

mean of data

evecs: ndarray, shape = (min(n_samples, n_features), n_features)

eigenvectors of the reconstructed data

evals: ndarray, size = min(n_samples, n_features)

eigenvalues of the reconstructed data

norms: ndarray, size = n_samples

normalization of each input

coeffs: ndarray, size = (n_samples, n_ev)

coefficients used to reconstruct X