Dist {MKMeans} | R Documentation |
It's a function of finding the distance between two observations.
Dist(x,y,type)
x |
Numeric. A vector denoting an observation. |
y |
Numeric. A vector denoting an observation. |
type |
Integer. The type of distance between observations. 1 for Euclidean distance. 2 for Manhattan distance. 3 for maximum deviation among dimensions. |
A numeric number.
Yarong Yang
Yarong Yang and Jacob Zhang.(2024) MKMeans: A Modern K-Means Clustering Algorithm.
x<-rnorm(10,0,1)
y<-rnorm(10,1,1)
z<-rnorm(10,2,1)
data<-cbind(x,y,z)
Res<-Dist(data[1,],data[2,],type=1)