+ Reply to Thread
Results 1 to 3 of 3

Thread: fuzzy c-means cluster analysis

  1. #1
    Clint Cabanero
    Join Date
    Apr 2010
    Posts
    25
    Points
    0
    Answers Provided
    0


    0

    Default fuzzy c-means cluster analysis

    Hello,

    Does ArcGIS Desktop 10 with Geostatistical Analyst perform fuzzy c-means cluster analysis? I am currently working with a procedure that requires I export tables to the R environment to do this. Would be nice if I can stay inside ArcGIS.

    Thank you,
    Clint

  2. #2
    Lauren Rosenshein
    Join Date
    May 2010
    Posts
    97
    Points
    6
    Answers Provided
    0


    0

    Default Re: fuzzy c-means cluster analysis

    Hi Clint,

    This is a great question! Actually, we've got a great sample script that shows using R from inside of ArcGIS to do cluster analysis! The sample script has several options for the cluster method, including cmeans, which may be just what you're looking for! Even if it isn't the same method that you are currently using, the sample shows the use of python scripting within ArcGIS to connect to R. It may be a useful template for you moving forward so that you can avoid jumping in and out of ArcGIS and R.

    Additionally, we are currently working on an implementation of K-Means ++ Clustering, with optional space/time constraints. We're calling it Group Similar Features, and it will be in the Spatial Statistics toolbox in ArcGIS 10.1. I know that 10.1 is still a ways off, but we're really excited about it and hopefully you will find it valuable in the future.

    Hope this helps!

    Lauren Rosenshein
    Geoprocessing Product Engineer

  3. #3
    Jeffrey Evans
    Join Date
    May 2010
    Posts
    213
    Points
    98
    Answers Provided
    12


    0

    Default Re: fuzzy c-means cluster analysis

    Here is an R script for performing fuzzy C-Means clustering. It accepts a point shapefile and assumes that the variables that you want to use for the analysis are in sequential columns. If you want to cluster polygons just change the sp class read/write functions to "readShapePoly" and "writePolyShape".

    #### START ####

    if (!require(maptools)) stop("maptools PACKAGE MISSING")
    if (!require(e1071)) stop("e1071 PACKAGE MISSING")

    inshape = "C:/ANALYSIS/points" # NAME OF POINT SHAPEFILE
    outshape = "C:/ANALYSIS/cmeans_points" # NAME OF CLUSTERED SHAPEFILE
    ID = "FID" # UNIQUE ID IN POINT SHAPEFILE

    # READ POINT SHAPEFILE AS SP CLASS OBJECT
    shape = readShapePoints(paste(inshape), proj4string=CRS(as.character(NA)), verbose=FALSE)

    ## FUZZY C-MEAN'S CLUSTERING ##
    nc=4 # NUMBER OF CLUSTERS

    # C-MEAN'S
    sclust <- cmeans(shape@data[,2:ncol(shape@data)], nc, iter.max=100, method="cmeans",
    weights=1, dist="euclidean")

    # CLUSTER RESULTS WITH CLASSES AND PROBS FOR EACH CLASS
    Zi <- as.data.frame(cbind(shape@data[,ID], sclust$cluster, sclust$membership))
    names(Zi) <- c("FID", "CLASS", "p1", "p2", "p3", "p4")

    # JOIN CLUSTER RESULTS TO SHAPEFILE AND WRITE OUT NEW SHAPEFILE
    shape@data = data.frame(shape@data, Zi[match(shape@data[,ID], Zi[,ID]),])
    writePointsShape(shape, paste(outshape))

    #### END ####
    Jeffrey S. Evans
    Senior Landscape Ecologist
    The Nature Conservancy
    Development by Design
    Affiliate Assistant Professor
    Zoology & Physiology
    University of Wyoming
    http://evansmurphy.wix.com/evansspatial

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts