mcrals: Angle constrained MCR-ALS.

Description Usage Arguments Details Value References See Also Examples

Description

Angle constrained MCR-ALS.

Usage

1
2
mcrals(D, ncomp, Ct = NULL, St = NULL, do.angle = T, f = 0.05,
  wavelength = NULL, max.niter = 500)

Arguments

D

a matrix with spectral values

ncomp

number of pure components to identify

Ct

initial estimates for pure contributions

St

initial estimates for pure spectra

do.angle

logical, should the angle constraint be used

f

how much of mean should be added for angle constraint

wavelength

a vector with wavelength if necessary

max.niter

maximum number of iterations

Details

The method implements a simple MCR-ALS algorithm with non-negativity constraints applied both to spectra and contributions by setting all negative values to zero. In addition an angle constraint can be applied by adding a small portion (default 5

If initial estimates for contributions and spectra are not provided the estimates will be generated with random numbers.

Value

The method returns results of unmixing as an object of mcrals class with following fields.

spec

resolved spectra of pure components.

conc

resolved concentrations of pure components.

ncomp

number of resolved components.

resvar

residual variance for each component.

References

1. W. Windig, M.R. Keenan, Appl. Spectrosc. 65 (2011) 349-357.

See Also

The class has numerous methods for investigating and refininf the unmixing results.

print prints information about a purity object.
summary shows summary statistics for the object.
plot plot overview of unmixing results.
plotSpectra shows a plot with resolved spectra.
plotConcentrations shows a plot with resolved concentrations.
plotVariance shows a plot with residual variance vs. number of components.
plotSpectraComparison compares resolved and ethalon spectra if available.
image.mcrals if data is a hypercube, shows resolved concetration map as an image.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# unmix hyperspectral data with and without angle constraint and compare the
# results for first two components
data(puredata)

res1 = mcrals(hsi$D, 3, do.angle = FALSE, wavelength = hsi$wavelength)
res2 = mcrals(hsi$D, 3, do.angle = TRUE, wavelength = hsi$wavelength)

summary(res1)
summary(res2)

# because initial estimates are made with random numbers
# the order of components in the results is different
par(mfrow = c(2, 1))
plotSpectra(res1)
plotSpectra(res2)
par(mfrow = c(1, 1))

par(mfrow = c(3, 2))
for (i in 1:3)
{
 image(res1, i)
 image(res2, i)
}
par(mfrow = c(1, 1))

svkucheryavski/supure documentation built on May 30, 2019, 9:32 p.m.