Learn R Programming

simuclustfactor (version 0.0.3)

fold: Folding Matrix to Tensor by Mode.

Description

X_i_jk => X_i_j_k, X_j_ki => X_i_j_k, X_k_ij => X_i_j_k

Usage

fold(X, mode, shape)

Value

X_i_j_k Three-mode tensor.

Arguments

X

Data matrix to fold.

mode

Mode of operation.

shape

Dimension of original tensor.

Examples

Run this code
X_i_jk = generate_dataset()$X_i_jk
X_i_j_k = fold(X_i_jk, mode=1, shape=c(I=8,J=5,K=4)) # X_i_j_k

Run the code above in your browser using DataLab