predict_ANN: Predict with ANN model

View source: R/deepRNN.r

predict_ANNR Documentation

Predict with ANN model

Description

Predict with ANN model

Usage

predict_ANN(
  model,
  x,
  batch_size = 1,
  scale_type = NULL,
  scaler = NULL,
  diff_type = NULL,
  timesteps = 1,
  lag = 0,
  differences = 1,
  invert_first_row = NULL,
  y = NULL,
  type = "univariate"
)

Arguments

model

A model object, e.g. returned by fit_MLP or fit_LSTM.

x

A feature tensor returned by as_MLP_X or as_LSTM_X.

batch_size

Batch size, the number of samples used per gradient update.

scale_type

Type of scaling with supported techniques min-max scaling (minmax), z-score scaling (zscore) and log transformation (log). Per default (NULL) no inverted scaling is done.

scaler

Scaling factors for the different scaling types. The type min-max scaling needs a list with vectors with min and max values for each outcome, z-score scaling needs a list with vectors with mean and sd values for each outcome, center scaling needs a constant value, and log transformation needs no scaler.

diff_type

Type of differentiation with supported techniques simple-differentiation (simple), log-differentiation (log) and percentage-differentiation (percentage). NULL (default) indicates that no inverted differentiation is done.

timesteps

The number of timesteps; stands for the number of different periods within one sample (record) of the resampled feature matrix, returned by as_LSTM_X.

lag

The number of considered lags on feature side.

differences

The number of differences.

invert_first_row

The row index of the first row of the training or test data set regarding to the raw data set before differencing.

y

A vector, matrix or data frame of raw data outcome values used for invert differentiation.

type

The type of time series: univariate or multivariate.

Value

A two- or three-dimensional array with predicted outcome values. A two-dimensional array results for fit_MLP or for fit_LSTM if return_sequences = FALSE. A three-dimensional array results for fit_LSTM if return_sequences = TRUE.

See Also

fit_MLP, as_MLP_X, fit_LSTM, as_LSTM_X, predict, scale_train_test.

Other Single & Multi Layer Perceptron (SLP, MLP): as_MLP_X(), as_MLP_Y(), as_tensor_1d(), as_tensor_2d(), as_tensor_3d(), build_MLP(), fit_MLP(), load_weights_ANN(), nsamples(), nsubsequences(), ntimesteps(), nunits(), save_weights_ANN()

Other Recurrent Neural Network (RNN): as_LSTM_X(), as_LSTM_Y(), 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(), save_weights_ANN(), start_invert_differencing()


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