Alslight

Alternating Least Squares (ALS) for Multivariate Curve Resolution (MCR)

This function performs Alternating Least Squares (ALS). It can be applied on a single matrix or on an set of several matrices (unfolded). The ALS procedure is quite well known and is used for many purposes. The complete file of R.Tauler and A.de Juan was modified in order to make it completely interfaced, to set default values and to suppress some options that are not suitable in the case of batch process data.

function (copt,sopt,sdopt,ropt,areaopt,rtopt,r2opt) = alslight (d,x0,ils,nexp,nit,tolsigma,sizes,columnwise,rowwise, nonnegativityvalue,nonnegativityconcentrations,nonnegativityconcspectra,nonnegativityspectra, nonnegativityforcedtozero,nonnegativitynnls,nonnegativityfnnls, unimodalityvalue,unimodalityconcentrations,unimodalityspectra,unimodalityconcspec,unimodalityvertical,unimodalityhorizontal,unimodalityaverage,unimodalitytolerance, closurevalue,closureconcentrations,closurespectra,closureconstant,eqconstconcvalue,eqconstspecvalue,eqconstconccsel,eqconstspecssel, threewayvalue,threewayconstC,threewayconstS,threewayconstCS,threewaynotrilinear,threewaytrilinearshapesynchallspecies,threewaytrilinearshapeallspecies,threewaytrilinearsynchsomespecies, ModelIn,ModelOut);

Inputs:
d experimental data matrix
x0 initial estimates of the concentration profiles or of the species spectra
ils allows to declare if all matrices contain the same number of species. By default, in this file, all species are present in all matrices
nexp number of data matrices analyzed simultaneously
nit maximum number of iterations (50 is the default)
tolsigma convergence criterion in the difference of standard deviation of residuals between iterations (0.1% is the default)
sizes vector of sizes of individual single matrices that constitute the augmented (unfolded) matrix
columnwise =1 if it is a columnwise augmented matrix, =0 otherwise
rowwise =1 if it is a rowwise augmented matrix, =0 otherwise
nonnegativityvalue =1 if non negativity constraint is used
nonnegativityconcentrations =1 if non negativity constraint for concentrations is used
nonnegativityconcspectra =1 if non negativity constraint for concentrations AND spectra is used
nonnegativityspectra =1 if non negativity constraint for spectra is used
nonnegativityforcedtozero =1 if to apply non negativity constraint it is forced to zero
nonnegativitynnls =1 if nnls algorithm is used to apply non negativity constraint
nonnegativityfnnls =1 if fnnls algorithm is used to apply non negativity constraint
unimodalityvalue =1 if unimodality constraint is used
unimodalityconcentrations =1 if unimodality constraint is applied to concentrations
unimodalityspectra =1 if unimodality constraint is applied to spectra
unimodalityconcspec =1 if unimodality constraint is applied to concentrations AND spectra
unimodalityvertical =1 if vertical unimodality constraint is applied
unimodalityhorizontal =1 if horizontal unimodality constraint is applied
unimodalityaverage =1 if average unimodality constraint is applied
unimodalitytolerance tolerance limit for unimodality constraint
closurevalue =1 if closure constraint is used
closureconcentrations =1 if closure constraint is applied to concentrations
closurespectra =1 if closure constraint is applied to spectra
closureconstant closure constant for closure constraint
eqconstconcvalue =1 if equality constraint for concentration profiles is used
eqconstspecvalue =1 if equality constraint for spectral profiles is used
eqconstconccsel value of the equality constraint in concentrations
eqconstspecssel value of the equality constraint in spectra
threewayvalue =1 by default to specify it works with a threeway dataset
threewayconstC =1 if threeway constant is used for concentration profiles
threewayconstS =1 if threeway constant is used for spectral profiles
threewayconstCS =1 if threeway constant is used for concentration AND spectral profiles
threewaynotrilinear =1 if the datamatrix does not have trilinear structure
threewaytrilinearshapesynchallspecies =1 if trilinear structure with synchronization and equal shapes for all species are present
threewaytrilinearshapeallspecies =1 if trilinear structure and equal shapes for all species are present
threewaytrilinearsynchsomespecies =1 if trilinear structure with synchronization for some species is present
ModelIn structure for inputs (before modelling step)
ModelOut structure for outputs (after modelling step)


Outputs:
copt optimized species concentrations
sopt optimized species spectra
ropt residuals d - copt*sopt at the optimum
sdopt standard deviation of fitting residuals at the optimum
areaopt areas of concentration profiles (only for quantitation)
rtopt ratio of areas (only for quantitation)
r2opt


Authors:
Roma Tauler & Anna de Juan
Chemometrics and Solution Equilibria group / University of Barcelona
Department of Analytical Chemistry
Diagonal 647, Barcelona 08028
Date: 1999
e-mail roma@quimio.qui.ub.es

Modified by Sébastien Gourvénec to fit the software designed in the frame of the NWAYQUAL Project
Date: 25.07.02

Contact: Sébastien Gourvénec: sebastien.gourvenec@vub.ac.be

References
- R. Tauler, Multivariate curve resolution applied to second order data, Chemom. Intell. Lab. Sys., 1995, 30, 133-146
- R. Tauler, A. Smilde & B.R. Kowalski, Selectivity, local rank, three-way data analysis and ambiguity in multivariate curve resolution, Journal of Chemometrics,1995, 9, 31

Adress of the file
Cubatch's main directory