Skip to content

Commit

Permalink
Edit docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
dahong67 committed Mar 1, 2024
1 parent 5322a3a commit 1db9d0f
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/gcp-opt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1db9d0f

Please sign in to comment.