Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^3: algorithm for 'best subsets'by halley (Prior) |
on Mar 05, 2005 at 04:16 UTC ( [id://436846]=note: print w/replies, xml ) | Need Help?? |
I've spent a good couple hours this evening trying to figure out the intent of this code, and actually using my own data. I'm not there yet.
I understand Bit::Vector, and making vectors that are the width of the keyword table, and marking the keyword bits for a given item. You don't seem to need the first gang of bit vectors at all; you are marking item bits in item-wide vectors, then never using those vectors. I understand what I read in Graph::UnionFind, but not its algorithm internally, but I might not need to. I think I understand the output it should give. What I don't understand is the way you're trying to combine these methods, and second-guessing the Graph::UnionFind's results on each loop. It seems to me that I can use G::UF without bit vectors at all, adding edges between correlated keywords, and then scan each partition for what keywords are in each partition. Can you speak more to your reasoning? --
In Section
Seekers of Perl Wisdom
|
|