Compute VAF (Variance Accounted For) for a Fitted Model
Source:R/evaluation_wrappers.R
compute_vaf_wrapper.RdComputes the global Variance Accounted For (VAF) for a fitted MFA or MPCA model. This is a unified wrapper that dispatches to the appropriate method-specific function.
Value
Numeric scalar: VAF value in [0, 1], where 1 indicates perfect reconstruction. Returns NA if computation fails.
Details
VAF is computed as \(1 - SSE/SST\), where SSE is the sum of squared reconstruction errors and SST is the total sum of squares.
Examples
if (FALSE) { # \dontrun{
fit <- mfa_em_fit(list_of_data, K = 3, r = 2)
vaf <- compute_vaf_wrapper("MFA", list_of_data, fit)
} # }