This is a wrapper around nmf from the package NMF to be used with objects of class hyperSpec.

nmf(
  x,
  ncomp = NULL,
  nrun = 1,
  method = "brunet",
  seed = "opa",
  prefix = "basis",
  ...
)

Arguments

x

a hyperSpec object.

ncomp

integer; number of pure components (factorization rank).

nrun

number of runs

method

character; use `NMF::getNMFMethod()` to get valid Methods and refer to the documentation of `NMF::nmf()` for further information.

seed

character; "opa" (Orthogonal Projection Approach, see omp) or one of `NMF::getNMFSeed()`. Refer to the documentation of `NMF::nmf()` for further information.

prefix

character; a prefix to name the pure spectra.

...

further arguments to be passed down to nmf.

Value

a list with the following components:

coefficients

coefficient matrix

basis

a hyperSpec object containing the basis (component) spectra

fit

the nmf fit as returned by `NMF::nmf()`

See also