as_LSTM_Y: Outcomes (Y) data format for LSTM

View source: R/deepRNN.r

as_LSTM_YR Documentation

Outcomes (Y) data format for LSTM

Description

Outcomes (Y) data format for LSTM

Usage

as_LSTM_Y(
  y,
  timesteps = 1L,
  reverse = FALSE,
  encoding = c("one_hot", "sparse")
)

Arguments

y

An outcome data set, usually a vector, matrix or data frame, returned by get_LSTM_XY.

timesteps

Number of timesteps; stands for the number of different periods within one sample (record) of the result, the resampled outcome matrix y.

reverse

Controls the order of the values in the resampled outcome matrix Y. By default they are used in the given order (forward in time), but they can also be used in reverse order (backward in time).

encoding

The type of encoding: one-hot encoding or sparse encoding.

Value

Dependent on the type of y and timesteps. If y is a factor, the result is a one-hot vector. If timesteps = NULL|1 a 2D-array with the dimensions (1) samples as number of records and (2) number of output units, representing a scalar outcome y, if timesteps >= 2 a 3D-array with the dimensions (1) samples, (2) timesteps and (3) number of output units, representing a sequence or multi-step outcome y.

See Also

get_LSTM_XY, as_LSTM_X, as_ANN_matrix, one_hot_encode, sparse_encode as_tensor_2d, as_tensor_3d.

Other Recurrent Neural Network (RNN): as_LSTM_X(), as_LSTM_data_frame(), as_LSTM_period_outcome(), as_lag(), as_timesteps(), build_LSTM(), fit_LSTM(), get_LSTM_XY(), get_period_shift(), load_weights_ANN(), predict_ANN(), save_weights_ANN(), start_invert_differencing()


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