¡@

Home 

python Programming Glossary: prefs

What is wrong with this python function from “Programming Collective Intelligence”?

http://stackoverflow.com/questions/1423525/what-is-wrong-with-this-python-function-from-programming-collective-intelligenc

number greater than 1 like in this example def sim_pearson prefs p1 p2 si for item in prefs p1 if item in prefs p2 si item 1.. in this example def sim_pearson prefs p1 p2 si for item in prefs p1 if item in prefs p2 si item 1 if len si 0 return 0 n len.. sim_pearson prefs p1 p2 si for item in prefs p1 if item in prefs p2 si item 1 if len si 0 return 0 n len si sum1 sum prefs p1..