2

I have many 3D data points, and I wish to find 'connected components' in this graph. This is where clusters are formed that exhibit the following properties:

  • Each cluster contains points all of which are at most distance from another point in the cluster.
  • All points in two distinct clusters are at least distance from each other.

This problem is described in the question and answer here.

Is there a MATLAB implementation of such an algorithm built-in or available on the FEX? Simple searches have not thrown up anything useful.

Community
  • 1
  • 1
Bill Cheatham
  • 11,396
  • 17
  • 69
  • 104
  • You may have a look at *JUNG* 'Java Universal Network/Graph Framework' http://jung.sourceforge.net/presentations/JUNG_M2K.pdf leveraging MATLAB's Java capabilities. – zellus Dec 31 '10 at 21:02

3 Answers3

1

Perhaps a density-based clustering algorithm can be applied in this case. See this related question for a description of the DBscan algorithm.

Community
  • 1
  • 1
Amro
  • 123,847
  • 25
  • 243
  • 454
0

I do not think that it is possible to satisfy both conditions in all cases.

If you decide to concentrate on the first condition, you can use Complete-Linkage hierarichical clustering, in which points or groups of points are merged based on the maximum distance between any two points. In Matlab, this is implemented in CLUSTERDATA (see help for the individual function steps).

To calculateyour cluster indices, you'd run

clusterIndex = clusterdata(coordiantes,maxDistance,'criterion','distance','linkage','complete','distance','euclidean')

In case you then want to simply eliminate points of different clusters that are less than minDistance apart, you can run pdist between clusters to clean up your connected components.

Jonas
  • 74,690
  • 10
  • 137
  • 177
0

k-means or k-medoid algorithm may be useful in this case.

mary
  • 1
  • 2
    Hi Mary, welcome to StackOverflow! You could make your answer even more helpful by providing some links. Since the question is specifically about MATLAB implementations, do you know of any for the algorithm you propose? – Jonas Heidelberg Aug 21 '11 at 15:14