predict.spectral: Predict function for Spectral clustering
Description
Return the closest Spectral clustering cluster for a new dataset. New instances are assigned to
the cluster of their nearest neighbour in the original (training) space, since the spectral
projection cannot be directly extended to unseen data without recomputing the affinity matrix.
Usage
# S3 method for spectral
predict(object, newdata, ...)
Arguments
object
The clustering model (of class spectral-class, created by SPECTRAL).
newdata
A new dataset (a data.frame), with same variables as the learning dataset.