Stepwise regrcls
From Eigenvector Documentation Wiki
Contents |
Purpose
STEPWISE_REGRCLS Step-wise regression for CLS models.
Synopsis
- [c,ikeep,res] = stepwise_regrcls(x,targspec,options);
- options = stepwise_regrcls('options');
Description
For a given set of measured spectra (x), STEPWISE_REGRCLS finds the subset of target spectra (targspec) that best fit each measured spectrum in (x). This can be used for classification i.e. an analyte identification algorithm. The model is:
x(i,:) = c(i,:)*targspec(ikeep{i},:)
where c(i,:) can be determined using non-negative least-squares [see optional input (options)].
Inputs
- x = MxN matrix of measured spectra (each row corresponds to a measured spectrum).
- targspec = KxN matrix of target (candidate) spectra.
Outputs
- c = MxK matrix of concentrations / contributions, c is non-zero only if a corresponding target spectrum is retained. If (options.p) is not empty, then (c) is Mx(Kp+K) where the first Kp rows correspond to the spectra in (options.p).
- ikeep = Mx1 cell array of indices, each cell corresponds to a row of input (x) and includes the indices of retained target spectra.
- res = Mx1 vector of mean sum-squared-residuals.
Options
options = an optional options structure containing one or more of the following fields:
- display: [ 'off' | {'on'} ], governs level of display to command window,
- automate: [ {'yes'} | 'no' ], automate the algorithm?
- automate = 'yes', makes no plots, and the step-wise regression stops when the fit improvement is not sigificant in an F Test at the probability level given in options.fstat.
- automate = 'no', requires interactive user input for each of the M spectra in (x).
- fstat: 0.95, probability level the F test that determines the significance of fit improvement.
- ccon: [ 'none' | {'nnls'} ], uses non-negativity on concentrations,in the concentration estimates.
- ccov: [], sqrt inverse noise/clutter covariance matrix, e.g. if Xc is a matrix of measured clutter spectra then ccov = inv(sqrt(cov(Xc))) [see COV_CV].
- p: KpxN matrix of spectra that are always included in the model,
- scls: [1:N], 1xN spectra scale axis {default = 1:N}.