ParJac

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

function [JTJ,Gr] = ParJac (Fac,X,Cols);
Description:
Calculates the JTJ matrix and the gradient of the loss function given the loading matrices for a PARAFAC model and the original array. It is faster than PARJacS.m but it is more memory-demanding.
Inputs:
Fac: cell array containing in each element a loading matrix, e.g. {A,B,C}
X: three way array on which the model has to be fitted
Cols: logical vector defining the non constant parameters in the vector defined as [A(:);B(:);C(:)].

Outputs:
JTJ: JTJ, where J is the Jacobian matrix of the loss function with respect to the model's parameters
Gr: gradient of the loss function with respect to the parameters

Called by:
Model_PARAFAC\GNParafac
Subroutines:
Internal: None
External: kr

Author:
Giorgio Tomasi
Royal Agricultural and Veterinary University
MLI, LMT, Chemometrics group
Rolighedsvej 30
DK-1958 Frederiksberg C
Danmark
Last modified: 07-May-2002 16:56:12
Contact: Giorgio Tomasi, gt@kvl.dk
References