This is a wrapper around a modified version of doALS from the package alsace to be used with objects of class hyperSpec.

als(x, ncomp = NULL, basis_init = NULL, prefix = "basis")

Arguments

x

a hyperSpec object.

ncomp

integer; number of pure components, does not need to be specified if basis_init is provided.

basis_init

a hyperSpec object; initial estimates of pure spectral components, if basis_init is NULL, initial components are estimated using opa.

prefix

character; a prefix to name the pure spectra.

Value

a list with the following components:

coefficients

coefficient matrix

basis

a hyperSpec object containing the basis (component) spectra

summary_stats

a named vector containing lof, rms and r2

fit

the als fit as returned by the custom wrapper around `ALS::als()`

See also