| predict.spectral | R Documentation |
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.
## S3 method for class 'spectral'
predict(object, newdata, ...)
object |
The clustering model (of class |
newdata |
A new dataset (a |
... |
Other parameters. |
SPECTRAL, spectral-class
## Not run:
require (datasets)
data (iris)
d = splitdata (iris, 5)
model = SPECTRAL (d$train.x, k = 3)
predict (model, d$test.x)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.