pflm.fpca.utils#

FPCA utilities

Functions#

estimate_rho(method_rho, flatten_func_data, ...)

Estimate the optimal rho parameter for CE scoring.

get_covariance_matrix(raw_cov, obs_grid)

Aggregate raw covariance entries onto a dense symmetric matrix.

get_eigen_analysis_results(reg_cov[, ...])

Compute eigenvalues and eigenvectors of a covariance matrix.

get_eigenvalue_fit(raw_cov, obs_grid, ...)

Fit eigenvalues by projecting raw covariance onto the FPCA subspace.

get_fpca_ce_score(flatten_func_data, mu, ...)

Compute conditional expectation (CE) FPCA scores and fitted curves.

get_fpca_in_score(flatten_func_data, mu, ...)

Compute Numerical integration FPCA scores and fitted curves.

get_fpca_phi(num_pcs, reg_grid, reg_mu, ...)

Build FPCA eigenvalues/eigenfunctions normalized on the grid.

get_measurement_error_variance(raw_cov, ...)

Estimate measurement error variance from raw covariance near the diagonal.

get_raw_cov(flatten_func_data, mu)

Compute per-subject raw covariance entries on the observation grid.

rotate_polyfit2d(x_grid, y, w, new_grid, ...)

Evaluate a 2D local polynomial fit on a rotated/new grid.

select_num_pcs_fve(eig_lambda, fve_threshold)

Select the number of principal components based on cumulative explained variance.

select_num_pcs_ic(criterion, y, t, obs_grid, ...)

Select number of PCs via AIC/BIC with fdapace-style early stopping.