Learn R Programming

SuperPCA (version 0.4.0)

TensProd: Compute tensor product over multiple dimensions using Khatri-Rao product

Description

Compute tensor product over multiple dimensions using Khatri-Rao product

Usage

TensProd(L, range = NA)

Arguments

L

List of length K, with matrix entries Lk: m_k X R;

range

Column indices over which to apply tensor product.Default is all columns (range = [1:R])

Value

Ans Array of size m_1 X m_2 ... X m_K, where the [i1,...iK]; entry is the sum of product Lk(i1,r)*...*LK(iK,r) over all r in range.

Examples

Run this code
# NOT RUN {
L <- list(matrix(rnorm(10*10),10,10),matrix(rnorm(10*10),10,10),matrix(rnorm(1000*10),1000,10))
TensProd(L)

# }

Run the code above in your browser using DataLab