| lwebzem | |
| lwebzem | |
| dataminer |
|
|
| #3 | Hi, looking for source code for fuzzy clustering. Any links or help is appreciated. Thanks. |
| |
| remi |
|
|
| #4 | Hello,
I have encoutered a problem in the new code (update from 11/2007) : I've tried these data (2 clusters) : 10 4 10.1 4 11.4 4 10.9 4 10.002 4 11 4
and everything is placed in the Cluster 0. Then I tried with the old Code, and everything was OK...
Regards, Remi |
| |
| lwebzem |
|
|
| #5 | Hi Remi,
sorry somehow I missed email notification.
Anyway I run it with your data but it works OK for me.
It put in 2 clusters. Here is the output:
C:\WINDOWS\Desktop\Perl\k_means\11_07>perl do_k_means.cgi
Number 0f clusters=2
10 4
10.1 4
11.4 4
10.9 4
10.002 4
11 4
Cluster: 0 Point 0 <br>
Cluster: 0 Point 1 <br>
Cluster: 1 Point 2 <br>
Cluster: 1 Point 3 <br>
Cluster: 0 Point 4 <br>
Cluster: 1 Point 5 <br>
C:\WINDOWS\Desktop\Perl\k_means\11_07>
If you give me more details I can investigate further.
But looks like it works OK.
Thanks and best regards,
Lwebzem.
|
| |
| gnembon |
|
|
| #6 | try 1 0 0 0 0 1 1 1 100 100 101 101 100 101 101 100 and the number of clusters: 3
the code breaks. In my opinion this is a problem with handling clusters with no items. In my implementation i have added the old centroid to the cluster preventing from 0-items clusters. |
| |
| lwebzem |
|
|
| #7 | yes you are right , it correctly classify in 2 clusters but fails when the number of clusters is 3. I will need investigate more for this issue. Thanks for your reply. |
| |
| lwebzem |
|
|
| #8 | I updated the demo online so it now correctly clusters also in 3 clusters for the below data (see prev. msg). The source code for 11/2007 is working fine (it already has this upgrade). Thanks to all for pointing on this. |
| |
| kpeter |
|
|
| #9 | Hi,
thank you for the online algorithm, very nice! I'm just wondering how the randomization of the initial centroids was done. I would expect that the K-means algorithm gives different clusterings for different runs on the same input from Wikipedia. But the online implementation seems to be deterministic for the same set of data. I've tried for example with the set of 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 and the clustering for a constant cluster size never changed (for my tries). Could you please give a little bit explanation on that?
Thanks and greetings, Peter
|
| |
| lwebzem |
|
|
| #10 | Hi Peter,
the initialization of first centroids is not really random. The program takes just first k points as inital centroids. That's why clustering is not changed. Let me know if any questions.
Thanks for interesting in this script and best regards. |
| |
| kpeter |
|
|
| #11 | Thank you for the answer! Peter
|
| |