pflm.fpca.utils.get_eigenvalue_fit#

get_eigenvalue_fit(raw_cov: ndarray, obs_grid: ndarray, fpca_phi_obs: ndarray, num_pcs: int)[source][source]#

Fit eigenvalues by projecting raw covariance onto the FPCA subspace.

Parameters:
raw_covnp.ndarray of shape (M, 5)

Raw covariance entries (sid, t1, t2, w, cov).

obs_gridnp.ndarray of shape (nt,)

Sorted observation grid.

fpca_phi_obsnp.ndarray of shape (nt, num_pcs)

Basis on the observation grid (only the first num_pcs columns used).

num_pcsint

Number of principal components to fit.

Returns:
np.ndarray of shape (num_pcs,)

Fitted eigenvalues in the FPCA subspace.

Raises:
ValueError

If fpca_phi_obs has incompatible shape.

Notes

The least-squares solve is performed with a low-level LAPACK GELS routine.