nmfAlgorithm lists access keys or retrieves NMF
algorithms that are stored in registry. It allows to list
nmfAlgorithm(name = NULL, version = NULL, all = FALSE, ...)
all=FALSE (default), then the algorithm is
returned as an NMFStrategy object that can be
directly passed to nmf. An error is thrown
if no matching algorithm is found.
If missing or NULL, then access keys of algorithms
-- that match the criteria version, are returned.
This argument is assumed to be regular expression if
all=TRUE or version is not NULL.'R' is supported, which
searched for plain R implementations.getNMFMethod when name is not
NULL and all=FALSE. It is not used
otherwise.an NMFStrategy-class object if name
is not NULL and all=FALSE, or a named
character vector that contains the access keys of the
matching algorithms. The names correspond to the access
key of the primary algorithm: e.g. algorithm lee
has two registered versions, one plain R
(.R#lee) and the other uses optimised C updates
(lee), which will all get named lee.
# list all main algorithms
nmfAlgorithm()
## [1] "brunet" "KL" "lee" "Frobenius" "offset"
## [6] "nsNMF" "ls-nmf" "pe-nmf" "snmf/r" "snmf/l"
## [11] "siNMF"
# list all versions of algorithms
nmfAlgorithm(all=TRUE)
## [1] ".R#brunet" "brunet" "KL" ".R#lee" "lee"
## [6] "Frobenius" ".R#offset" "offset" ".R#nsNMF" "nsNMF"
## [11] ".M#brunet" "ls-nmf" "pe-nmf" "snmf/r" "snmf/l"
## [16] ".siNMF" "siNMF"
# list all plain R versions
nmfAlgorithm(version='R')
## brunet lee offset nsNMF
## ".R#brunet" ".R#lee" ".R#offset" ".R#nsNMF"
canFit