Als sit
Jump to navigation
Jump to search
Purpose
ALS_SIT Alternating least squares with shift invariant tri-linearity
Synopsis
- [model,xo] = als_sit(x,ncomp); % identifies model with default options (calibration step)
- [model, xo] = als_sit(x,ncomp,options); % identifies model (calibration step)
- options = als_sit('options'); % returns a default options structure
- pred = als_sit(xnew,model); % find scores for new samples given old model
- als_sit demo
Description
ALS_SIT employs an MCR-like model to employ a tri-linearity constraint to factors that may shift (e.g., GC/LC elution profiles). See:
- Schneide, P.-A., Bro, R., Gallagher, N., "Shift-invariant tri-linearity (SIT) - A new model for resolving untargeted GC-MS data," J Chemom (2023).
- Schneide, P.-A., Bro, R., Gallagher, N., "Soft shift-invariant tri-linearity: modelling shifts and shape changes in gas-chromatography coupled mass spectrometry," [in progress] (2023).
It can also be use for non-shifting profiles:
- Tauler, R., Marques, I., Casassas, E., J Chemom, 12(1), 55–75 (1998),
The convention for ALS_SIT is that samples are in the last mode and the shifting profiles are in the first mode. E.g. if the samples for input (x) are in Mode 1, and the shifting mode is Mode 2, the call to ALS_SIT is
- model = als_sit(permute(x,[2,3,1]),ncomp);
Inputs
- x = multi-way array to be decomposed
- If x is a IxJxK array (all K slabs have similar size) then this is similar to an input for PARAFAC.
- If the K slabs have different size then x is input as a cell array e.g., x{1} = X1; x{2} = X2; (note the curly brackets). Mode 1 of the x{k} can shift and/or have different dimensions [i.e., size(x{k},1)] can vary, but Mode dimension [size(x{k},2] is the same for all x{k}, k=1,...,K.
- ncomp = the number of components to estimate
Outputs
- model = standard model object, or
- pred = standard prediction object.
- model.sitsmodel has the following fields (see SHIFTMAP):
- p = (NpxK) loadings: p = Pb for SIST.
- a0 = standard phase spectrum.
- t = MxK scores: Tb for SIST.
- model.sitsmodel has the following fields (see SHIFTMAP):
- xo = bi-linear form of input(x) used w/in ALS_SIT.
Options
options = structure array with the following fields:
Display and Plotting
- display: [ 'off' | {'on'} ] governs level of display to command window.
- plots: [ 'none' | {'final'} ] governs level of plotting.
- waitbar: [ 'off' | 'on' | {'auto'} ] governs use of waitbar,
Convergence and Conditions
- ittol: [ {1e-8} ] relative change in model residuals,
- itolabs: [ {1e-6} ] absolute change in model residuals,
- itmax: [ {100} ] maximum number of iterations,
- timemax: [ {3600} ] maximum time for iterations (s),
Shiftmap Options
- shiftmap = SHIFTMAP options, structure array with the following fields:
- (see SHIFTMAPfor a complete listing)
- ncomp = 0.95 {default} scalar number of PCs, K, for PCA of the amplitude spectra in SIST or SIT.
- If 0<ncomp<1 then this is fraction variance captured,
- if ncomp>1 this is the number of PCs, or
- if ncomp==1, then the algoritm is SIT.
- Note that (ncomp) can be a 1xK vector allowing a
- different number of PCs for each of the K factors.
- (ncomp) is not used for factors w/ sitconstraint = 0.
- options.als = ALS options, structure array with the following fields:
- (see ALS for a complete listing)
- itmax = 2 {default} maximum number of iterations in the alternating constrained least squares algorithm.