Tensor Kernels
This page of the docs is still a work-in-progress. Check back later!
GCPDecompositions.TensorKernels
— ModuleTensor kernels for Generalized CP Decomposition.
GCPDecompositions.TensorKernels.khatrirao
— Functionkhatrirao(A1, A2, ...)
Compute the Khatri-Rao product (i.e., the column-wise Kronecker product) of the matrices A1
, A2
, etc.
GCPDecompositions.TensorKernels.khatrirao!
— Functionkhatrirao!(K, A1, A2, ...)
Compute the Khatri-Rao product (i.e., the column-wise Kronecker product) of the matrices A1
, A2
, etc. and store the result in K
.
GCPDecompositions.TensorKernels.mttkrp
— Functionmttkrp(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.
See also: mttkrp!
GCPDecompositions.TensorKernels.mttkrp!
— Functionmttkrp!(G, X, (U1, U2, ..., UN), n, buffer=create_mttkrp_buffer(X, U, 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 and store the result in G.
Optionally, provide a buffer
for intermediate calculations. Always use create_mttkrp_buffer
to make the buffer
; the internal details of buffer
may change in the future and should not be relied upon.
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
See also: mttkrp
, create_mttkrp_buffer
GCPDecompositions.TensorKernels.create_mttkrp_buffer
— Functioncreate_mttkrp_buffer(X, U, n)
Create buffer to hold intermediate calculations in mttkrp!
.
Always use create_mttkrp_buffer
to make a buffer
for mttkrp!
; the internal details of buffer
may change in the future and should not be relied upon.
See also: mttkrp!
GCPDecompositions.TensorKernels.mttkrps
— Functionmttkrps(X, (U1, U2, ..., UN))
Compute the Matricized Tensor Times Khatri-Rao Product Sequence (MTTKRPS) of an N-way tensor X with the matrices U1, U2, ..., UN.
See also: mttkrps!
GCPDecompositions.TensorKernels.mttkrps!
— Functionmttkrps!(G, X, (U1, U2, ..., UN))
Compute the Matricized Tensor Times Khatri-Rao Product Sequence (MTTKRPS) of an N-way tensor X with the matrices U1, U2, ..., UN and store the result in G.
See also: mttkrps