predict.gmInstance: Make predictions from a probabilistic network
Description
Makes predictions (either as the most likely state or as the
conditional distributions) of variables conditional on evidence on other variables
in an independence network.
Usage
## S3 method for class 'gmInstance':
predict(object, response, predictors, newdata, type = "class", ...)
Arguments
object
A gmInstance object
response
A vector of response variables to make predictions on
predictors
A vector of predictor variables to make predictions
from. Defaults to all variables that are note responses.
newdata
A data frame
type
If "class", the most probable class is returned; if
"distribution" the conditional distrubtion is returned.
...
Not used
Value
A list with components
predA list with the predictions
pevidenceA vector with the probability of the evidence on
which the prediction is based