DESCRIPTION OF PARAFAC2 METHOD
Historic:
R.A Harshman proposed the PARAFAC2 model in 1972, but it was not until 1993 that an algorithm for fitting the model was published by H.A.L. Kiers. This algorithm is quite complicated due to the special characteristics of the model, and later Kiers et al. (1998) proosed another simpler algorithm that is the one used in CuBatch and described below.
Aim:
The aim of PARAFAC2 is to model n-way data. In some cases a data set (ideally trilinear) does not conform to the PARAFAC model. The reason can be sampling problems or physical artifacts. Another problem occurs when the slabs of the array are not of the same row (or column) dimension. An example could be that in a longitudinal analysis certain subjects did not go along all the way (some persons died before the analysis ended, some batches were stopped due to breakdown etc.). Both these problems can be, in certain cases, be solved with the use of the PARAFAC2 model.
Criterion:
The PARAFAC2 loss function is: min Sum (Xk - A Dk (Pk B)t)2
Algorithm:
The PARAFAC2 model can be considered as an advanced variant of the normal PARAFAC1 model.
It handles slab-wise deviations between components in one mode as long as the cross-product of the components stays reasonably fixed. This can be utilized for modeling chromatographic data with retention time shifts, modeling certain batch data of varying length etc.
The PARAFAC2 model is given
Xk = A*Dk*(Pk*H)' + Ek, k = 1, .., K
Xk is a slab of data (I x J) in which J may actually vary with K.
K is the number of slabs.
A (I x F) are the scores or first-mode loadings.
Dk is a diagonal matrix that holds the k'th row of C in its diagonal.
C (K x F) is the third mode loadings
H is an F x F matrix
Pk is a J x F orthogonal matrix (J may actually vary from k to k.
The PARAFAC2 Alternating Least Squares (ALS) algorithm is the following
1- Initialiaze A, B and C
2- For every k, k=1...K
Qk=Xkt A Dk Bt
Pk=Qk(QktQk)-.5
3- For every k, k=1...K
Yk=XkPk
4- Determine A, B and C from one iteration of a PARAFAC-ALS on Y_
5- Go to step 1 until relative change in fit is small
Code:
Matlab code is from the N-Way toolbox or Andersson and Bro - Danmark

Applications:
Batch process data, Chromatographic data ...
Dataset reference:
VUBdatatest.mat
References:
[1] - Kiers H.A.L., Ten Berge J.M.F., Bro R., "Parafac2 - Part 1: A direct fitting algorithm for the Parafac2 model", J. of Chemometrics, Vol 13, Issue 3-4, 1999, 275-294
[2] - Bro R., Andersson C.A., Kiers H.A.L., "Parafac2 - Part 2: Modeling chromatographic data with retention time shifts", J. of Chemometrics, Vol 13, Issue 3-4,1999, 295-309
[3] - J. Riu and R. Bro. Jack-knife for estimation of standard errors and outlier detection in PARAFAC models. Chemom.Intell.Lab.Syst., 2002, in press Faber, K., Bro, R., and Hopke, P.K. Recent developments in CANDECOMP/PARAFAC algorithm. A critial review. 2002. Submitted