I've been working through the examples in collective intelligence and found issue i not to sure how to fix
>> [rownames[r] for r in k]
An error is called saying that K is not defined, why would this be?
Thanks for writing us about this, and I'm sorry for the confusion. I see that someone reported a similar issue on the book's errata page, though it has yet to be confirmed.
Can you try kclust] instead of k], because it looks like kclust is what is defined.
If you run into any more problems, feel free to report errata or you can email email@example.com for more complex questions.