-4

Fixed-width clustering algorithm:

Fixed width clustering creates a set of clusters of fixed radius (width) w. Here the width w is a parameter to be specified by the user. First, a data vector is taken and used as the centroid (center) of the first cluster with radius w. Then for each subsequent data vector the Euclidean distance between the centroid of the current clusters and this data vector is computed.

If the distance to the closest cluster center from the data vector is less than the radius w, the data vector is added into that cluster and the centroid of that cluster is adjusted to the mean of the data vectors it contains. If the distance to the closest cluster center is more than the radius w, then a new cluster is formed with that data vector as the centroid. This operation produces a set of disjoint, fixed width (radius of w) clusters in the feature space.

Please help me to implement it using C language.

Community
  • 1
  • 1
  • What have you got so far and where did you get stuck? You do realise you fully create the impression of copying and pasting your homework assignment? – micans Mar 13 '15 at 13:10

1 Answers1

2

Don't ask us to do your job. Start doing it yourself!

Also, you've got your math not worked out.

Consider 1-dimensional data, radius 12, and the following data set:

0, 12, 18, 22, 25

Do your algorithm with paper and pencil and check the diameter of your cluster. It doesn't work.

Has QUIT--Anony-Mousse
  • 76,138
  • 12
  • 138
  • 194