cs_fold: Column Space Folding of 2D DelayedArray

cs_fold-methodsR Documentation

Column Space Folding of 2D DelayedArray

Description

The inverse operation to cs_unfold.

Usage

cs_fold(mat, m = NULL, modes = NULL)

## S4 method for signature 'DelayedArray'
cs_fold(mat, m, modes)

Arguments

mat

DelayedArray object (only 2D)

m

the mode corresponding to cs_unfold

modes

the original modes of the DelayedArray

Details

This function is an extension of the cs_fold by DelayedArray.

This is a wrapper function to fold.

Value

DelayedArray (higher than 2D)

References

T. Kolda, B. Bader, "Tensor decomposition and applications". SIAM Applied Mathematics and Applications 2009.

See Also

fold, cs_unfold

Examples

library("DelayedRandomArray")
darr <- RandomUnifArray(c(2,3,4))
matT3 <- DelayedTensor::cs_unfold(darr, m=3)
identical(
    as.array(DelayedTensor::cs_fold(matT3, m=3, modes=c(2,3,4))),
    as.array(darr))

rikenbit/DelayedTensor documentation built on Sept. 28, 2024, 5:43 a.m.