predict.D2.disc: Classify Multivariate Observations by Mahalanobis Distance
Description
Classify multivariate observations according to D2.disc discriminant analysis.
Usage
## S3 method for class 'D2.disc':
predict(object, newdata, \dots)
Arguments
object
an object of class "D2.disc".
newdata
data.frame or matrix of observations to be classified.
...
arguments based from or to other methods.
Value
A list of
classa factor containing the classification of each row in newdata.
D2a matrix (n x k) containing Mahalanobis distances between each row in
newdata and the center of each class.
Details
This function is a method for the generic function predict() for class "D2.disc".
It can be invoked by calling predict(x) for an object x of the appropriate class,
or directly by calling predict.D2.disc(x) regardless of the class of the object.