tensor3D2matrix: tensor3D2matrix

Description Usage Arguments Value Examples

View source: R/embeddingFunctions.R

Description

Auxiliary function to flatten 3D tensor into a 2D matrix, discarding overlapping data.

Usage

1
tensor3D2matrix(X, shift = 1)

Arguments

X
  • Input 3D Tensor (Samples,Time Window,Features) containing the embedded form of X

shift
  • Integer specifying the shift value used to construct the tensor

Value

2D Matrix (Samples,Features) obtained by "unrolling" the tensor

Examples

1
2
3
4
X <- EuStockMarkets
time_window <- 5
X_windowed <- matrix2Tensor3D(X,time_window,time_window)
X_reconstructed <- tensor3D2matrix(X_windowed,time_window)

jdestefani/ExtendedDFML documentation built on Dec. 20, 2021, 10:04 p.m.