predict.GRUAttention.Rd
Predict method for GRUAttention
# S3 method for GRUAttention
predict(model, data, top.k.attributions = NULL, explain.mode = NULL, ...)
DataFrame
Data for prediction.
Every row in the data
should contain one piece of
record data for prediction, i.e. it should be structured as follows:
First column: Record ID, type INTEGER.
Other columns: Time-series and external data values, arranged in time order.
The number of columns in data
should be equal to
time.dim
* (M + 1) + 1, where M is the number of exogenous variables
of the input data in the training phase.
integer, optional
Specifies the number of features with highest attributions to output.
If explain.mode
is 'time-wise' then this value needs to be smaller
than the length of time series data for prediction.
If explain.mode
is 'feature-wise', then this value needs to be no
greater than the number of exogenous variables.
Defaults to 0.
c('time-wise', 'feature-wise'), optional
Specifies the mechanism for generating the reason code for inference results.
'time-wise': Use attention weights to assign time-dimension-wise contributions.
'feature-wise': Use Bayesian Structural Time Series(BSTS) to assign feature-wise contributions.
Defaults to 'time-wise'.
DataFrame
Predicted values, structured as follows:
ID: type INTEGER, timestamp.
VALUE: type DOUBLE, forecast values of data records.
REASON_CODE: type NCLOB, containing sorted SHAP values for test data at each time step/each feature component.
Time-series prediction using GRU equipped with Attention Mechanism.