R/flash_conv_crit_fns.R
flash_conv_crit_max_chg_L.RdAn alternative objective function that can be used to determine
convergence when fitting a flash object. Calculates the
maximum (absolute) change over all (posterior expected values for)
loadings \(\ell_{ik}\). At each iteration, the loadings vectors
\(\ell_{\cdot 1}, \ldots, \ell_{\cdot K}\) are \(L^2\)-normalized.
flash_conv_crit_max_chg_L(curr, prev, k)The flash_fit object from the current iteration.
The flash_fit object from the previous iteration.
Only used during sequential backfits (that is, calls to
flash_backfit where extrapolate = FALSE). It then
takes the index of the factor/loadings pair currently being optimized.
A scalar, which is compared against the tolerance parameter
tol to determine whether a fit has converged.