cp_atld {rrcov3way} | R Documentation |
Alternating Trilinear Decomposition (ATLD) for Candecomp/Parafac (CP)
Description
Alternating Trilinear Decomposition algorithm for estimating the Candecomp/Parafac (CP) model. It is based on an alternating least squares principle and replaces the iterative procedure used in the traditional PARAFAC algorithm by an improved procedure. This improved procedure contains Moore-Penrose pseudoinverse computations based on singular value decomposition (SVD) which should be theoretically more robust to similarities in spectra and time profiles
Usage
cp_atld(
X,
n,
m,
p,
ncomp,
conv = 1e-06,
start = "random",
maxit = 5000,
trace = FALSE
)
Arguments
X |
A three-way array or a matrix. If |
n |
Number of A-mode entities |
m |
Number of B-mode entities |
p |
Number of C-mode entities |
ncomp |
Number of components to extract |
conv |
Convergence criterion, default is |
start |
Initial values for the A, B and C components. Can be
|
maxit |
Maximum number of iterations, default is |
trace |
Logical, provide trace output. |
Value
The result of the decomposition as a list with the following elements:
-
fit
Value of the loss function -
fp
Fit value expressed as a percentage -
ss
Sum of squares -
A
Component matrix for the A-mode -
B
Component matrix for the B-mode -
C
Component matrix for the C-mode -
iter
Number of iterations -
tripcos
Minimal triple cosine between two components across the three component matrices, used to inspect degeneracy -
mintripcos
Minimal triple cosine during the iterative algorithm observed at every 10 iterations, used to inspect degeneracy -
ftiter
Matrix containing in each row the function value and the minimal triple cosine at every 10 iterations
Author(s)
Valentin Todorov, valentin.todorov@chello.at; Violetta Simonacci, violetta.simonacci@unina.it
References
H.-L. Wu, M. Shibukawa, K. Oguma, An alternating trilinear decomposition algorithm with application to calibration of HPLC-DAD for simultaneous determination of overlapped chlorinated aromatic hydrocarbons, Journal of Chemometrics 12 (1998) 1–26.
Examples
## Not run:
## Example with the OECD data
data(elind)
dim(elind)
res <- cp_atld(elind, ncomp=3)
res$fp
res$fp
res$iter
## End(Not run)