Macha Posted June 8, 2011 Share Posted June 8, 2011 I am debugging a network but I'm not sure where it goes wrong. I want a nested foreach loop. The first foreach loops by number. The inner foreach loops over groups. To test this setup I included an xform that multiplies size by 0.9. The first foreach works because the object reduces in size. The inner loop doesn't work and I don't understand why. And yes, both have different stamp value names. foreachhmm.hip Quote Link to comment Share on other sites More sharing options...
Macha Posted June 8, 2011 Author Share Posted June 8, 2011 Well I solved that problem (tick the merge/apply points boxes) but it turned out to be unrelated to why my thing didn't work (I think). Baah, I'll just post the whole problem then: I am trying to set up k-means clustering. http://en.wikipedia.org/wiki/K-means_clustering But something isn't working. The idea is to find the mean position of groups, then re-create the groups with the new mean, etc until you have a nicely balanced set of groups. Somehow it only iterates once and doesn't change anything... Any ideas? kmeans.hip Quote Link to comment Share on other sites More sharing options...
Macha Posted June 8, 2011 Author Share Posted June 8, 2011 Ah, I seem to have solved it. The problem was with confusing id's on the mean points. I made a video of it: Quote Link to comment Share on other sites More sharing options...
Adam Ferestad Posted June 8, 2011 Share Posted June 8, 2011 (edited) It looks like you are close to what you are wanting. How close are the brown and blue boxes? Are they set apart in the depth axis from this view? Have you tried a simpler model? For some reason my gut is kicking that there is some sort of error being generated in the algorithm around the blue/brown boxes, since the green box looks like it is working perfectly. Of course, this is all just conjecture based on what I read on the wiki page and what I could understand of the math with what I know. Did you start them setup in an equilateral triangle? I might try that to see if it works under ideal circumstances, then start tweaking things until it gives me what I want. edit: Nevermind... lol. Edited June 8, 2011 by Adam Ferestad Quote Link to comment Share on other sites More sharing options...
petz Posted June 8, 2011 Share Posted June 8, 2011 why not using an attribtransfer-sop for this? petz kmeans1.hip Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.