我知道這不是一個特定的編碼問題,但這是最適合提問的地方。所以請耐心等待。基於用戶的過濾:推薦系統
假設我有一個像下面給出一個字典,列出10喜歡每個人
likes={
"rajat":{"music","x-men","programming","hindi","english","himesh","lil wayne","rap","travelling","coding"},
"steve":{"travelling","pop","hanging out","friends","facebook","tv","skating","religion","english","chocolate"},
"toby":{"programming","pop","rap","gardens","flowers","birthday","tv","summer","youtube","eminem"},
"ravi":{"skating","opera","sony","apple","iphone","music","winter","mango shake","heart","microsoft"},
"katy":{"music","pics","guitar","glamour","paris","fun","lip sticks","cute guys","rap","winter"},
"paul":{"office","women","dress","casuals","action movies","fun","public speaking","microsoft","developer"},
"sheila":{"heart","beach","summer","laptops","youtube","movies","hindi","english","cute guys","love"},
"saif":{"women","beach","laptops","movies","himesh","world","earth","rap","fun","eminem"}
"mark":{"pilgrimage","programming","house","world","books","country music","bob","tom hanks","beauty","tigers"},
"stuart":{"rap","smart girls","music","wrestling","brock lesnar","country music","public speaking","women","coding","iphone"},
"grover":{"skating","mountaineering","racing","athletics","sports","adidas","nike","women","apple","pop"},
"anita":{"heart","sunidhi","hindi","love","love songs","cooking","adidas","beach","travelling","flowers"},
"kelly":{"travelling","comedy","tv","facebook","youtube","cooking","horror","movies","dublin","animals"},
"dino":{"women","games","xbox","x-men","assassin's creed","pop","rap","opera","need for speed","jeans"},
"priya":{"heart","mountaineering","sky diving","sony","apple","pop","perfumes","luxury","eminem","lil wayne"},
"brenda":{"cute guys","xbox","shower","beach","summer","english","french","country music","office","birds"}
}
我怎麼能確定誰擁有類似likes.Or人的項目,也許誰二人類似於most.Also這將是如果您可以將我指向適用於基於用戶或基於項目的過濾的示例或教程,則會很有幫助。
編程集體智慧的[第2章](http://books.google.co.uk/books?id=fEsZ3Ey-Hq4C&lpg=PP1&pg=PA7#v=onepage&q&f=false)對此進行了全面的介紹。示例代碼在Python中,這是另一個優點。 – 2012-07-16 10:52:02
我知道這本書,但它是非常古老的(2007年出版),網絡已經發生了很大的變化。所以我不認爲這本書的大部分例子今天都會有效。 – 2012-07-16 10:55:37
基本技術仍然適用於您提供的樣本數據。如果你正在尋找更復雜/可擴展的東西,那麼你可能想在你的問題中提到這一點。它可能也值得一提,你已經嘗試或考慮過。 – 2012-07-16 10:59:54