Description Usage Arguments Value Methods (by generic)
The function seed
provides a single interface for calling all seeding
methods used to initialise NMF computations.
These methods at least set the basis and coefficient matrices of the initial
object
to valid nonnegative matrices.
They will be used as a starting point by any NMF algorithm that accept
initialisation.
IMPORTANT: this interface is still considered experimental and is subject to changes in future release.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | seed(x, model, method, ...)
## S4 method for signature 'mMatrix,NMF,NMFSeed'
seed(x, model, method, rng, ...)
## S4 method for signature 'ANY,ANY,'function''
seed(x, model, method, name, ...)
## S4 method for signature 'ANY,ANY,missing'
seed(x, model, method, ...)
## S4 method for signature 'ANY,ANY,'NULL''
seed(x, model, method, ...)
## S4 method for signature 'ANY,ANY,numeric'
seed(x, model, method, ...)
## S4 method for signature 'ANY,ANY,character'
seed(x, model, method, ...)
## S4 method for signature 'ANY,list,NMFSeed'
seed(x, model, method, ...)
## S4 method for signature 'ANY,numeric,NMFSeed'
seed(x, model, method, ...)
|
x |
target matrix one wants to approximate with NMF |
model |
specification of the NMF model, e.g., the factorization rank. |
method |
specification of a seeding method. See each method for details on the supported formats. |
... |
extra to allow extensions and passed down to the actual seeding method. |
rng |
rng setting to use.
If not missing the RNG settings are set and restored on exit using
All arguments in |
name |
optional name of the seeding method for custom seeding strategies. |
an NMFfit
object.
seed(x = mMatrix,model = NMF,method = NMFSeed)
: This is the workhorse method that seeds an NMF model object using a given
seeding strategy defined by an NMFSeed
object, to fit a given
target matrix.
seed(x = ANY,model = ANY,method = function)
: Seeds an NMF model using a custom seeding strategy, defined by a function.
method
must have signature (x='NMFfit', y='matrix', ...)
, where
x
is the unseeded NMF model and y
is the target matrix to fit.
It must return an NMF
object, that contains the seeded
NMF model.
seed(x = ANY,model = ANY,method = missing)
: Seeds the model with the default seeding method given by
nmf.getOption('default.seed')
seed(x = ANY,model = ANY,method = NULL)
: Use NMF method 'none'
.
seed(x = ANY,model = ANY,method = numeric)
: Use method
to set the RNG with setRNG
and use method
“random” to seed the NMF model.
Note that in this case the RNG settings are not restored. This is due to some internal technical reasons, and might change in future releases.
seed(x = ANY,model = ANY,method = character)
: Use the registered seeding method whose access key is method
.
seed(x = ANY,model = list,method = NMFSeed)
: Seed a model using the elements in model
to instantiate it with
nmfModel
.
seed(x = ANY,model = numeric,method = NMFSeed)
: Seeds a standard NMF model (i.e. of class NMFstd
) of rank
model
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.