Re: [R] Assign new observations to Clara clusters

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Wed 27 Jul 2005 - 02:11:48 EST

On Tue, 26 Jul 2005, Nestor Fernandez wrote:

> Dear all,
>
> I need to assign new observations to cluster groups previously identified for a
> different dataset. The original clustering was performed using Clara. I gess
> one way is to assign each new observation to the nearest medioid of the
> original cluster. Is there a way of doing this in R? Is there a better way of
> classifying new observations into clusters?

If you have the medoids (and these are in the fit object), use knn1 (in package class) to assign.

Cluster analysis is not really designed to classify new observations. With Euclidean distance the above is possible, but I would probably take the clusters formed and used them to do a supervised classification: your default option is edited NN-1 classification and you may well be able to do better, depending on the size of the problem.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Wed Jul 27 02:16:45 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:34:01 EST