[R] cluster analysis and supervised classification: an alternative to knn1?

Ulrich Bodenhofer bodenhofer at bioinf.jku.at
Thu May 27 17:16:07 CEST 2010

> What do you suggest in order to assign a new observation to a determined
> cluster?
As I mentioned already, I would simply assign the new observation to the
cluster to whose exemplar the new observation is most similar to (in a
knn1-like fashion). To compute these similarities, you can use the daisy()
function. However, you have to do some tricks, since daisy() is designed for
computing square matrices of all mutual distances for a given data set. I
did not find another function that is better suitable (e.g. a function that
allows to compute simply the distance of two distinct samples). Maybe others
have an idea. In any case, you have to make sure that data either remain
unscaled or that you take care yourself that your new observation is scaled
exactly with the same parameters that were used for clustering before.

Cheers, Ulrich
View this message in context: http://r.789695.n4.nabble.com/cluster-analysis-and-supervised-classification-an-alternative-to-knn1-tp2231656p2233308.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list