flash_verbose_max_chg: Display the maximum difference in scaled loadings and factors

View source: R/flash_verbose_fns.R

flash_verbose_max_chgR Documentation

Display the maximum difference in scaled loadings and factors

Description

Displays the maximum (absolute) change over all (posterior expected values for) loadings \ell_{ik} and factors f_{jk}. At each iteration, the loadings vectors \ell_{\cdot 1}, \ldots, \ell_{\cdot K} and factors f_{\cdot 1}, \ldots, f_{\cdot K} are L^2-normalized.

Usage

flash_verbose_max_chg(curr, prev, k)

Arguments

curr

The flash_fit object from the current iteration.

prev

The flash_fit object from the previous iteration.

k

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.

Details

This function is an example of a function that may be passed to parameter fns in function flash_set_verbose to customize the output that is printed after each greedy or backfitting iteration. See flash_set_verbose for details and examples.

Value

A character string, suitable for printing progress updates.

See Also

flash_verbose_elbo, flash_verbose_elbo_diff, flash_verbose_max_chg_L, flash_verbose_max_chg_F


flashier documentation built on Oct. 17, 2023, 5:07 p.m.