Description Usage Arguments Details Value References See Also Examples
Angle constrained MCR-ALS.
1 2 |
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 |
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.
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. |
1. W. Windig, M.R. Keenan, Appl. Spectrosc. 65 (2011) 349-357.
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. |
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.