Description Usage Arguments Value Note Author(s) References See Also Examples
Alternating Least Squares algorithm for the minimization of the Tucker2 loss function.
1 2 |
X |
Matrix (or data.frame coerced to a matrix) of order ( |
n |
Number of |
m |
Number of |
p |
Number of |
r1 |
Number of extracted components for the |
r2 |
Number of extracted components for the |
r3 |
Number of extracted components for the |
start |
Starting point: 0 starting point of the algorithm from generalized eigenvalue decomposition, 1 random starting point (orthonormalized component matrices), 2 if users specified component matrices |
conv |
Convergence criterion |
model |
Tucker2 model choice (1 for T2-AB, 2 for T2-AC, 3 for T2-BC) |
A |
Optional (necessary if start=2) starting value for |
B |
Optional (necessary if start=2) starting value for |
C |
Optional (necessary if start=2) starting value for |
H |
Optional (necessary if start=2) starting value for the matricized core array (frontal slices) |
A list including the following components:
A |
Orthonormal component matrix for the |
B |
Orthonormal component matrix for the |
C |
Orthonormal component matrix for the |
H |
Matricized core array (frontal slices) |
f |
Loss function value |
fp |
Fit percentage |
iter |
Number of iterations |
cputime |
Computation time |
La |
Matrix which should be diagonal, and if so, contain ‘intrinsic eigenvalues’ for |
Lb |
Matrix which should be diagonal, and if so, contain ‘intrinsic eigenvalues’ for |
Lc |
Matrix which should be diagonal, and if so, contain ‘intrinsic eigenvalues’ for |
The loss function to be minimized is ||X_A - A G_A kron(C',B')||^2 where X_A and G_A denote the matricized (frontal slices) data array and core array, respectively, and kron stands for the Kronecker product.
T2func
is the same as T2funcrep
except that all printings are available.
Maria Antonietta Del Ferraro mariaantonietta.delferraro@yahoo.it
Henk A.L. Kiers h.a.l.kiers@rug.nl
Paolo Giordani paolo.giordani@uniroma1.it
H.A.L. Kiers, P.M. Kroonenberg \& J.M.F. ten Berge (1992). An efficient algorithm for TUCKALS3 on data with large numbers of observation units. Psychometrika 57:415–422.
P.M. Kroonenberg and J. de Leeuw (1980). Principal component analysis of three-mode data by means of alternating least squares algorithms. Psychometrika 45:69–97.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | data(Bus)
# labels for Bus data
laba <- rownames(Bus)
labb <- substr(colnames(Bus)[1:5], 1, 1)
labc <- substr(colnames(Bus)[seq(1,ncol(Bus),5)], 3, 8)
# T2-AB solution using two components for the A- and B-modes
# (rational starting point by SVD [start=0])
BusT2 <- T2func(Bus, 7, 5, 37, 2, 2, 37, 0, 1e-6, 1)
# T2-AC solution using two components for for the A- and C-modes
# (random orthonormalized starting point [start=1])
BusT2 <- T2func(Bus, 7, 5, 37, 2, 5, 2, 1, 1e-6, 2)
# T2-BC solution using two components for the B- and C- modes
# (user starting point [start=2])
BusT2 <- T2func(Bus, 7, 5, 37, 7, 2, 2, 1, 1e-6, 3, diag(7),
matrix(rnorm(5*2),nrow=5), matrix(rnorm(37*2),nrow=37),
matrix(rnorm(7*4),nrow=7))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.