predict.mixture {opera} | R Documentation |
Predict method for Mixture models
Description
Performs sequential predictions and updates of a mixture object based on new observations and expert advice.
Usage
## S3 method for class 'mixture'
predict(
object,
newexperts = NULL,
newY = NULL,
awake = NULL,
online = TRUE,
type = c("model", "response", "weights", "all"),
use_cpp = getOption("opera_use_cpp", default = FALSE),
quiet = TRUE,
...
)
Arguments
object |
Object of class inheriting from 'mixture' |
newexperts |
An optional matrix in which to look for expert advice with which predict. If omitted, the past predictions of the object are returned and the object is not updated. |
newY |
An optional matrix with d columns (or vector if |
awake |
An optional array specifying the
activation coefficients of the experts. It must have the same dimension as experts. Its entries lie in |
online |
A boolean determining if the observations in newY are predicted sequentially (by updating the object step by step) or not. If FALSE, the observations are predicting using the object (without using any past information in newY). If TRUE, newY and newexperts should not be null. |
type |
Type of prediction. It can be
|
use_cpp |
|
quiet |
|
... |
further arguments are ignored |
Value
predict.mixture
produces a matrix of predictions
(type = 'response'), an updated object (type = 'model'), or a matrix of
weights (type = 'weights').