Obtains predictions from a fitted sequence model object.
# S3 method for seqm
predict(object, new_seqs, new_covariates = NULL,
type = "response", ...)
a fitted object of class "seqm"
from seqm
.
an object of class "proc"
with which to predict.
a new covariate matrix with which to predict.
a string specifying whether to predict responses ("response"
)
or features ("feature"
) or both ("both"
).
further arguments to be passed to predict.keras.engine.training.Model
.
If type="response"
, a vector of predictions. The vector gives the
probabilities of the response variable being one if response_type="binary"
.
If type="feature"
, a matrix of rnn outputs. If type="both"
, a list
containing both the vector of response variable prediction and the rnn output matrix.
It unserialize object$model_fit
to obtain a keras model of class
"keras.engin.training.Model"
and then calls predict
to obtain predictions.
seqm
for fitting sequence models.