predict.mixdir {mixdir} | R Documentation |
Predict the class of a new observation.
Description
Predict the class of a new observation.
Usage
## S3 method for class 'mixdir'
predict(object, newdata, ...)
Arguments
object |
the result from a call to |
newdata |
a named vector with a single new observation or a data.frame with the same structure as the original data used for fitting the model. Missing features or features not encountered during training are replaced by NA. |
... |
currently unused |
Value
A matrix of with the same number of rows as the input and one column for each latent class.
Examples
data("mushroom")
X <- as.matrix(mushroom)[1:30, ]
res <- mixdir(X)
# Predict Class
predict(res, mushroom[40:45, ])
predict(res, c(`gill-color`="black"))
[Package mixdir version 0.3.0 Index]