vector_as_ANN_matrix: Transform a vector into a ANN compatible matrix

View source: R/deepUtils.r

vector_as_ANN_matrixR Documentation

Transform a vector into a ANN compatible matrix

Description

Transform a vector into a ANN compatible matrix

Usage

vector_as_ANN_matrix(
  x,
  ncol = 1,
  by = c("row", "col", "step"),
  reverse = FALSE
)

Arguments

x

A numeric vector.

ncol

The number of columns in the resulting matrix. If by = step, the number of columns is equal to the number of timesteps used for a LSTM.

by

Controls the transformation process. The options row and col lead to a matrix whereby the values are structured row-wise or column-wise. The option step stands for a stepwise order of the values row by row (e.g. 1 2 3, 2 3 4, 4 5 6 etc.).

reverse

Controls the order of the values in the transformed vector x. By default, they are used in the given order, but they can also be used in reverse order.

Value

The transformed or resampled vector x into a matrix.

See Also

as_tensor_3d.

Other Utils: as_ANN_matrix(), degree(), distance(), list_as_numeric(), probability(), radian(), random_seed(), re.factor(), sd_pop(), similarity(), var_pop(), vector_as_numeric()


stschn/deepANN documentation built on June 25, 2024, 7:27 a.m.