From 1db9d0f31098e8e69a11d7270f0e0b32a2fc6011 Mon Sep 17 00:00:00 2001 From: David Hong Date: Thu, 29 Feb 2024 22:39:56 -0500 Subject: [PATCH] Edit docstrings --- src/gcp-opt.jl | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/gcp-opt.jl b/src/gcp-opt.jl index b26aad1..8343d6e 100644 --- a/src/gcp-opt.jl +++ b/src/gcp-opt.jl @@ -175,11 +175,16 @@ function _gcp( end """ - mttkrp(X, U, n) - - Algorithm for computing one mode of MTTKRP is from "Fast Alternating LS Algorithms - for High Order CANDECOMP/PARAFAC Tensor Factorizations" by Phan et al., specifically - section III-B. + mttkrp(X, (U1, U2, ..., UN), n) + +Compute the Matricized Tensor Times Khatri-Rao Product (MTTKRP) +of an N-way tensor X with the matrices U1, U2, ..., UN along mode n. + +Algorithm is based on Section III-B of the paper: +> **Fast Alternating LS Algorithms for High Order CANDECOMP/PARAFAC Tensor Factorizations**. +> Anh-Huy Phan, Petr Tichavský, Andrzej Cichocki. +> *IEEE Transactions on Signal Processing*, 2013. +> DOI: 10.1109/TSP.2013.2269903 """ function mttkrp(X, U, n) # Dimensions @@ -233,9 +238,9 @@ end """ khatrirao(A1, A2, ...) - - Computes the Khatri-Rao product (i.e., column-wise Kronecker product) - of the matrices `A1`, `A2`, etc. + +Compute the Khatri-Rao product (i.e., the column-wise Kronecker product) +of the matrices `A1`, `A2`, etc. """ function khatrirao(A::Vararg{T,N}) where {T<:AbstractMatrix,N} # Special case: N = 1