K-means clustering

8248
3
Jump to solution
12-12-2012 07:10 AM
AstridHarendza
New Contributor III
Hello,

I have a question regarding k-means clustering in ArcGIS. I have a shapefile, which contains a number of polygons with different values for mean, standard deviation, skewness and quantiles. I would like to cluster them using k-means clustering. I am aware that ArcGIS 10.1 just integrated a tool for this, but I am still working under ArcGIS 10.0. I also discovered a toolbox, which is using R in ArcGIS, but I'm having problems with the installation of the required Design package in R and hence can't get it to work. 

Accordingly I was wondering if you could suggest a different way on how to get k-means clustering to work in ArcGIS 10.0. Can I do the clustering in R and then import the results somehow into ArcGIS? Tips and suggestions are highly appreciated!

Many thanks for your help,
Astrid
0 Kudos
1 Solution

Accepted Solutions
JeffreyEvans
Occasional Contributor III
Astrid,
See my post in this thread for related R code. Please note that I am using a K-Medoids algorithm to avoid some know problems with K-means. There is also code for selecting the optimal k based on the partition silhouettes. 

http://forums.arcgis.com/threads/27922-R-Point-Clustering-Tools-Error?highlight=cluster

I was using an optional maptools syntax so please note that the last line of the code is incorrect and should be:
writeOGR(shape, getwd(), "cluster_results", driver="ESRI Shapefile")

View solution in original post

0 Kudos
3 Replies
JeffreyEvans
Occasional Contributor III
Astrid,
See my post in this thread for related R code. Please note that I am using a K-Medoids algorithm to avoid some know problems with K-means. There is also code for selecting the optimal k based on the partition silhouettes. 

http://forums.arcgis.com/threads/27922-R-Point-Clustering-Tools-Error?highlight=cluster

I was using an optional maptools syntax so please note that the last line of the code is incorrect and should be:
writeOGR(shape, getwd(), "cluster_results", driver="ESRI Shapefile")
0 Kudos
MuhammedThouseef_MT
New Contributor

Hi Jeffrey,

Let me know how to use K-Medoid algo in ArcGIS ?

0 Kudos
AstridHarendza
New Contributor III
Thank you very, very much Jeffrey! This solved my problem :)!
0 Kudos