GenParafac
Location: ..\cubatch\Model_PARAFAC\private\GenParafac.m
function
[A,B,C,Fit,it,FitStory,Time,ConvCond,LmSt,JackSV] = GenParafac (X,Fac,Options,LM,Start);
Description:
Fits a PARAFAC model to a 3-way array.
Inputs:
X: double array of data
Fac: number of factors
Options (optional): see
PAROptions
LM
(optional): 0 if Alternating Least Squares (ALS),
1 if Levenberg-Marquadt (LM)
Start (optional):
cell vector with the initial estimations for the factors (each
element contains a matrix with the loadings in the corresponding mode).
Outputs:
A,B,C:
loading matrices
Fit(1): value of the loss function after
initialisation
Fit(2): value of the loss
function after fitting in the compressed space
Fit(3): value of the loss
function after fitting (refining) in the original space
it(1) iterations in fitting
it(2) iterations in refining the model (if
compression is performed)
FitStory: values of the loss function along the iterations (only for the
LM algorithm)
Time(1) : seconds used for the compression
Time(2) : seconds used for the initialisation
Time(3) : seconds used for the fitting of the model
Time(4) : seconds used for the refining of the model
Time(5) : total time employed
ConvCond: met convergence criteria (only for LM
algorithm). See
GNPARAFAC
LmSt: values of the damping parameter along with the iterations (only for
LM algorithm). See
GNPARAFAC
JackSV: singular values of the Jacobian (only for LM
algorithm). See
GNPARAFAC
Called by:
Model_PARAFAC\PARAFACGNFit
Subroutines:
Internal: svdf,
tucker3, vec (returns vectorised argument)
External:
check,
genparafac,
gnparafac,
initpar,
kr,
nshape,
parafac,
paroptions,
scale_factors
Author:
Giorgio Tomasi
Royal Agricultural and Veterinary University
MLI, LMT, Chemometrics group
Rolighedsvej 30
DK-1958 Frederiksberg C
Danmark
Last modified: 06-Jun-2002 20:08:52
Contact: Giorgio Tomasi, gt@kvl.dk
References
function
[A,B,C,G]=tucker3(X,F,maxit);
Description:
SVD-based algorithm for finding the parameters of the
three-way Tucker3 model when the array as well as
parameters are complex
Inputs:
X: 3-way
F: number of factors in the three modes
maxit: max number of iterations
Outputs:
A,B,C: loading
matrices
G: core
Subroutines:
Internal: none
External: nshape (n-way
toolbox)
Author:
Rasmus Bro & Claus Andersson
Royal Agricultural and Veterinary University
MLI, LMT, Chemometrics group
Rolighedsvej 30
DK-1958 Frederiksberg C
Danmark
Last modified:
19-gen-03
Contact: Rasmus Bro,
rb@kvl.dk
References
function
[u,s,v]=svdf(X,F);
Description:
Rank-reduced SVD based on NIPALS (the power-method the
way is actually implemented here)
Inputs:
X: matrix
F: number of factors
Outputs:
u,s,v:
see svd (MatLab buildin function)
Subroutines:
Internal: none
External: none
Author:
Rasmus Bro & Claus Andersson
Royal Agricultural and Veterinary University
MLI, LMT, Chemometrics group
Rolighedsvej 30
DK-1958 Frederiksberg C
Danmark
Last modified:
19-gen-03
Contact: Rasmus Bro,
rb@kvl.dk
References
[1] - Faber N.M., Bro R., Hopke P.K., "Recent
developments in CANDECOMP/PARAFAC algorithm, a critical review", Chemometrics
Intell. Lab. Systems, Vol 65, 2003, 119-137
[2] - Gill P.E., Murray W., Wright M.H., "Practical
Optimization", (Academic Press: 1986).
[3] - Tomasi G. and
Bro R. "Fitting the PARAFAC model", Comp.Stat.Data Anal., 2002, Submitted