InitPar

Location: ..\cubatch\Model_PARAFAC\private\InitPar.m

function [conv,A,B,C,...] = InitPar (X,F,Mode,Iter,Tol,Const);

Description:
Find initial estimates for a PARAFAC model with F components fit on X

Inputs:
X: array of double
F: number of factors to extract
Mode: six type of initialisation are available

'orth' ten starts with orthogonal random matrices. The best is picked after Iter iterations
'random' ten starts with random matrices. The best is picked after Iter iterations
'nipals' the matrices are obtained via SVD
'swatld' SWATLD algorithm, available only up to 3 way and no missing values
'dltd' DTLD algorithm, available only up to 3 way and no missing values
'best' uses all the possible initalisations and picks the best one


Iter: max number of iterations for the iterative methods
Tol: tolerance (i.e. relative fit decrease) for convergence in the iterative methods
Const: constraints (if required the initial values are found according to constraints); the format is identical to the one used for PARAFAC.m

Outputs:
conv: returns 0 if the initialisation does not converge within the max number of iter.
A,B,C,...: initial estimations for the loadings

Called by:
Model_PARAFAC\Calculate, Model_PARAFAC\GNParafac, Model_PARAFAC\GenParafac

Subroutines:
Internalswatld
External: dtld, kr, ini, missmult, nmodel, normit, nshape, parafac

Author:
Giorgio Tomasi
Royal Agricultural and Veterinary University
MLI, LMT, Chemometrics group
Rolighedsvej 30
DK-1958 Frederiksberg C
Danmark

Last modified: 05-Nov-2002 18:22:24

Contact: Giorgio Tomasi, gt@kvl.dk

References


SWATLD
 

function [A,B,C,errflag,iter] = swatld(X,A0,B0,tol,maxiter)

Description:
Fits a PARAFAC model to a three way array via Self-Weighted Alternating Trilinear Decomposition

Inputs:
X: array
A0,B0: initial estimations for the loading matrices A and B (here random matrices)
tol: convergence criterion based on the relative decrease in fit
maxiter: maximum number of iterations.

Outputs:
A,B,C: loading matrices
errflag: indicates normal exit (0) or maximum number of iterations (1)
iter: number of iterations

Subroutines:
Internal:    none
External:    nmodel


Author:
Faber N.M.
...
Modified by:
Giorgio Tomasi

Royal Agricultural and Veterinary University
MLI, LMT, Chemometrics group
Rolighedsvej 30
DK-1958 Frederiksberg C
Danmark

Last modified: 05-gen-03

Contact: Giorgio Tomasi, gt@kvl.dk

References
[1] Chen et al. Chemometrics and Intelligent Laboratory Systems, 52 (2000) 75-86.