| flash_fit {flashier} | R Documentation | 
Extract a flash_fit object
Description
flash_fit objects are the "internal" objects used by flash
functions to fit an EBMF model. Whereas flash objects
(the end results of the fitting process) include user-friendly fields and
methods, flash_fit objects were not designed for public
consumption and can be unwieldy. Nonetheless, some advanced
flash functionality requires the wielding of
flash_fit objects. In particular, initialization, convergence,
and "verbose" display functions all take one or more flash_fit
objects as input (see parameter init_fn in function
flash_greedy; parameter fn in
flash_set_conv_crit;
and parameter fns in flash_set_verbose).
For users who would like to write custom functions, the accessor functions
and methods enumerated below may prove useful. See
flash_set_verbose for an example.
Usage
flash_fit(flash)
flash_fit_get_pm(f, n)
flash_fit_get_p2m(f, n)
flash_fit_get_est_tau(f)
flash_fit_get_fixed_tau(f)
flash_fit_get_tau(f)
flash_fit_get_elbo(f)
flash_fit_get_KL(f, n)
flash_fit_get_g(f, n)
Arguments
flash | 
 A   | 
f | 
 A   | 
n | 
 Set   | 
Details
The following S3 methods are available for flash_fit objects at all
times except while optimizing new factor/loadings pairs as part of a
"greedy" fit:
fitted.flash_fitReturns the "fitted values"
E(LF') = E(L) E(F)'.residuals.flash_fitReturns the expected residuals
Y - E(LF') = Y - E(L) E(F)'.ldf.flash_fitReturns an
LDFdecomposition, with columns ofLandFscaled as specified by the user.
Value
See function descriptions below.
Functions
-  
flash_fit_get_pm(): The posterior means for the loadings matrixL(when parameternis equal to1) or factor matrixF(whenn = 2). While optimizing new factor/loadings pairs as part of a "greedy" fit, only the posterior means for the new loadings\ell_{\cdot k}or factorf_{\cdot k}will be returned. -  
flash_fit_get_p2m(): The posterior second moments for the loadings matrixL(when parameternis equal to1) or factor matrixF(whenn = 2). While optimizing new factor/loadings pairs, only the posterior second moments for the new loadings\ell_{\cdot k}or factorf_{\cdot k}will be returned. -  
flash_fit_get_est_tau(): Equal to1 / \sigma^2, where\sigma^2is the estimated portion of the residual variance (total, by row, or by column, depending on the variance type). -  
flash_fit_get_fixed_tau(): Equal to1 / s^2, wheres^2is the fixed portion of the residual variance (total, by row, or by column). -  
flash_fit_get_tau(): The overall precision1 / (\sigma^2 + s^2). -  
flash_fit_get_elbo(): The variational lower bound (ELBO). -  
flash_fit_get_KL(): A vector containing the KL-divergence portions of the ELBO, with one value for each factor (whenn = 2) or set of loadings (whenn = 1). While optimizing new factor/loadings pairs, only the KL-divergence for the new factor or loadings will be returned. -  
flash_fit_get_g(): A list containing estimated priors on loadings\hat{g}_\ell(whenn = 1) or factors\hat{g}_f(whenn = 2). While optimizing new factor/loadings pairs, only the estimated prior on the new factor or loadings will be returned.