Iterates through the factors of a flash object, updating each until convergence.
flash_backfit(data, f_init, kset = NULL, var_type = c("by_column", "by_row", "constant", "zero", "kroneker"), tol = 0.01, ebnm_fn = ebnm_pn, ebnm_param = flash_default_ebnm_param(ebnm_fn), verbose = FALSE, nullcheck = TRUE, maxiter = 1000)
data | An n by p matrix or a flash data object created using
|
---|---|
f_init | A fitted flash object to be refined. |
kset | The indices of factors to be optimized (NULL indicates all factors). |
var_type | The type of variance structure to assume for residuals. |
tol | Specifies how much the objective can change in a single iteration to be considered not converged. |
ebnm_fn | The function used to solve the Empirical Bayes Normal Means problem. |
ebnm_param | A named list containing parameters to be passed to
ebnm_fn when optimizing; defaults are set by
|
verbose | If TRUE, various progress updates will be printed. |
nullcheck | If TRUE, then after running hill-climbing updates,
|
maxiter | A maximum number of iterations to perform (in the
inner loop). To perform just one iteration we suggest setting
|
A fitted flash object.
l = rnorm(100) #simulate some rank 1 data f = rnorm(10) Y = outer(l,f) + matrix(rnorm(1000),nrow=100) fg = flash_add_greedy(Y,10)#>#>#> [1] 34.12