eigenstrapping.utils.reconstruct_data
- eigenstrapping.utils.reconstruct_data(coeffs, eigenmodes)[source]
Reconstruct a dataset of n_vertices given a set of eigenmodes and coeffs conditioned on data using ordinary least squares (OLS)
- Parameters:
coeffs (np.ndarray of shape (M,)) – Coefficients output from fitting OLS
eigenmodes (np.ndarray of shape (n_vertices, M)) – Eigenmodes of n_vertices by number of eigenvalues M
pv (float (default 100), rounds up to nearest index) – Percentage of eigenmodes to use for reconstruction (default 100%)
- Returns:
new_data – Reconstructed data
- Return type:
np.ndarray of (n_vertices,)