cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

k-means worksheet

Gigiont
1-Newbie

k-means worksheet

Hello,

I'm trying to write an algorithm to calculate centroids of 3 clusters obtained from a data set using the k-means method.

Attached is the MC12 worksheet with the algorithm. For some reason, I only get the correct centroid for the first cluster and when using the same function to calculate the centroids for second and third cluster I get the same wrong answer.

I found that somebody had posted a worksheet with k-means algorithm a long time ago at this thread:

http://communities.ptc.com/thread/17242

but the worksheet has been removed from the thread.

Thank you,

Gigi

7 REPLIES 7

I found that somebody had posted a worksheet with k-means algorithm a long time ago at this thread:

http://communities.ptc.com/thread/17242

but the worksheet has been removed from the thread.

Yes, thats a sad story that PTC wasn't able to merge the old and valuable collab forum into this community thingy.

Find attched from my archive the three files which where attachment in that thread as well as a pdf of how this thread looked originally. Hope it helps.

RichardJ
19-Tanzanite
(To:Werner_E)

Those don't work in MC15. I forget why, but at some point I fixed it. Here's a new version.

I am not sure that I ever fixed the way Dunn's validty index works. If not, then although it is a validity index, it's not Dunn's

Edit: where did you get the original thread layout from? The Wayback Machine?

Edit: where did you get the original thread layout from? The Wayback Machine?

No, before the old collab closed down I tried to make a copy of the site using HTTrack. Unfortunately that software wasn't smart enough to sort out multiple links to the same page and so the very same page was loaded over and over again and eventually the software would stop downloading further files. The result is an incomplete copy which consists of a myriad of duplicate (vers small) files. I guess most of the pages are there at least once, but as soon a a series of "next-next-..." is broken, I get no access to the following pages. So its pure luck if I am able to retrieve an old thread or not. I tried different times until the site closed and kept three copies. The smallest consists of approx. 150000 files and takes up 4,5 GByte but the largest consists of more than half a million files and takes up about 30 GByte space. I host them on an older USB 2.0 extren drive which makes access time even worse. Copying or zipping that copy takes hours.

I never was successful in accessing the collab using the Wayback Machine.

RichardJ
19-Tanzanite
(To:Werner_E)

I never was successful in accessing the collab using the Wayback Machine.

Nor me, that's why I asked. Nobody could access the old Collab without logging in, so I think there would be no way for an automated system to make a copy.

There was the guest login but it doesn't work with the WaybackMachine.

Thank you. The program to calculate the "Repeat_k_means" function gives the error "This value must be a scalar" in the block starting with "if NewValue = 1". I'm running MC14....

Richard just wrote that the old files won't work with newer versions of MC - maybe thats the cause. He posted a newer worksheet http://communities.ptc.com/message/245486#245486

Top Tags