Matlab codes for several tensor decompositions


Collection of matlab codes to compute the following tensor decompositions : 
(via the Alternating Least Squares (ALS) algorithm combined with Line Search techniques to speed up convergence)
  • Candecomp/Parafac (CP) decomposition of a 3rd order tensor, denoted CP3
  • Candecomp/Parafac (CP) decomposition of a 4th order tensor, denoted CP4
  • Candecomp/Parafac (CP) decomposition of a 5th order tensor, denoted CP5
  • Block-Component-Decomposition in rank-(L, L, 1) terms denoted BCD-(L, L, 1)
  • Block-Component-Decomposition in rank-(Lr, Lr, 1) terms denoted BCD-(Lr, Lr, 1)
  • Block-Component-Decomposition in rank-(L, M, .) terms denoted BCD-(L, M, .)
  • Block-Component-Decomposition in rank-(Lr, Mr, .) terms denoted BCD-(Lr, Mr, .)
  • Block-Component-Decomposition in rank-(L, M, N) terms denoted BCD-(L, M, N)
  • Block-Component-Decomposition in rank-(Lr, Mr, Nr) terms denoted BCD-(Lr, Mr, Nr)
Reference:
L. De Lathauwer and D. Nion, "Decompositions of a Higher-Order Tensor in Block Terms - Part III: Alternating Least Squares Algorithms", SIAM J. Matrix Anal. Appl. (SIMAX), Special Issue on Tensor Decompositions and Applications, Vol. 30, Issue 3, pp.1067-1083, 2008


Candecomp/Parafac (CP) Decomposition
for 3-way, 4-way and 5-way tensors.
BCD-(L, L, 1)  and  BCD-(Lr, Lr, 1)
  • Code for CP3 [here] (schematic representation below)
  • Code for CP4 [here]
  • Code for CP5 [here]






Schematic representation of CP3.
1st view:  Sum of rank-1 tensors.
2nd view: Tucker-3 Model with diagonal core tensor D.
3rd view: Joint Diagonalization (S holds K diagonal matrices, the K diagonals are the rows of C).


  • Code for BCD-(L, L, 1)    [here]
  • Code for BCD-(Lr, Lr, 1)  [here]




Schematic representation of the BCD-(L, L, 1). The BCD-(Lr, Lr, 1) is similar, except that the value of L can be different in each term r of the sum, r = 1,...,R.

BCD-(L, M, .)  and  BCD-(Lr, Mr, .) BCD-(L, M, N)  and  BCD-(Lr, Mr, Nr)
  • Code for BCD-(L, M, .)    [here]
  • Code for BCD-(Lr, Mr, .)  [here]





Schematic representation of the BCD-(L, M, .). The BCD-(Lr, Mr, 1) is similar, except that the values of Lr and Mr can be different in each term r of the sum, r = 1,...,R.
  • Code for BCD-(L, M, N)     [here]
  • Code for BCD-(Lr, Mr, Nr)  [here]



Schematic representation of the BCD-(L, M, N). The
BCD-(Lr, Mr, Nr) is similar, except that the values of Lr , Mr and Nr can be different in each term r of the sum, r = 1,...,R.