[R] distance in the function kmeans
n.bouget@laposte.net
n.bouget at laposte.net
Fri May 28 12:54:29 CEST 2004
I don't exactly understand what you do, could you show me the
program that you execute to do that?
> n.bouget wrote:
> > Hi,
> > I want to know which distance is using in the function kmeans
> > and if we can change this distance.
> > Indeed, in the function pam, we can put a distance matrix in
> > parameter (by the line "pam<-pam(dist(matrixdata),k=7)" ) but
> > we can't do it in the function kmeans, we have to put the
> > matrix of data directly ...
> > Thanks in advance,
> > Nicolas BOUGET
>
> One solution is to transform the data in a way, that the
euclidean
> distance of the transformed values represents some other
distance of the
> original values. This works at least for the
Mahalanobis-Distance, when
> one applies a multivariate technique to a PCA transformed
and re-scaled
> matrix, but I don't know if there are transformations for
some other
> distance measures.
>
> Thomas P.
>
More information about the R-help
mailing list