pub fn loo_cv_press(
fit: &FregreLmResult,
data: &FdMatrix,
y: &[f64],
scalar_covariates: Option<&FdMatrix>,
) -> Result<LooCvResult, FdarError>Expand description
LOO-CV / PRESS diagnostics for a linear functional regression model.
Uses the hat-matrix shortcut: LOO residual = e_i / (1 - h_ii).
ยงErrors
Returns FdarError::InvalidDimension if data has zero rows, its column
count does not match fit.fpca.mean, y.len() does not match the row count,
or the number of rows is not greater than the number of model parameters.
Returns FdarError::ComputationFailed if Cholesky factorization fails or
the total sum of squares is zero.