If prob=FALSE, then returns a length-\(N\) factor with the
same levels as the class variable in x, where \(N\) is the number
of rows in newdata. Each element is the most likely
class for the corresponding row in newdata. If prob=TRUE,
returns a \(N\) by \(C\) numeric matrix, where \(C\) is the number of
classes; each row corresponds to the class posterior of the instance.
Arguments
object
A bnc_bn object.
newdata
A data frame containing observations whose class has to be
predicted.
prob
A logical. Whether class posterior probability should be returned.
...
Ignored.
Details
Ties are resolved randomly. Inference is much slower if
newdata contains NAs.