ldf {flashier} | R Documentation |
LDF method for flash and flash fit objects
Description
Given a flash
or flash_fit
object, returns the LDF
decomposition Y \approx LDF'
.
Usage
ldf(object, type)
## S3 method for class 'flash'
ldf(object, type = "f")
## S3 method for class 'flash_fit'
ldf(object, type = "f")
Arguments
object |
An object inheriting from class |
type |
Takes identical arguments to function |
Details
When the prior families G_\ell^{(k)}
and G_f^{(k)}
are closed
under scaling (as is typically the case), then the EBMF model (as
described in the documention to function flash
) is only
identifiable up to scaling by a diagonal matrix D
:
Y = LDF' + E.
Method ldf
scales columns \ell_k
and f_k
so that, depending on the argument to parameter type
, their
1-norms, 2-norms, or infinity norms are equal to 1.
Value
A list with fields L
, D
, and F
, each of which
corresponds to one of the matrices in the decomposition Y \approx LDF'
(with the columns of L
and F
scaled according to
argument type
). Note that D
is returned as a vector rather
than a matrix (the vector of diagonal entries in D
). Thus, "fitted
values" LDF'
can be recovered as L %*% diag(D) %*% t(F)
.
Methods (by class)
-
ldf(flash)
: LDF decomposition forflash
objects -
ldf(flash_fit)
: LDF decomposition forflash_fit
objects