tungwaiyip.info

home

about me

links

Blog

< December 2012 >
SuMoTuWeThFrSa
       1
2 3 4 5 6 7 8
9101112131415
16171819202122
23242526272829
3031     

past articles »

Click for San Francisco, California Forecast

San Francisco, USA

 

Collaborative Filtering in 9 Lines of Code

I have purchased Toby Segaran's book Programming Collective Intelligence when it first come out in 2007. Yet I still have not been able to finished it after all these years. Now I am giving myself another push. While I was revisiting the book I tried to implement its technique using Pandas. I am quite happy to be able to do it in just 9 lines of code. So I have put together a little article to show collaborative filtering using Pandas. This is also a great exercise for me using to make a very nice document using iPython notebook for the first time.

The main reason for not having completed the book is not because it is not interesting or not useful. It is very much an excellent book to introduce readers to the topic of collective intelligence. The problem is I strive to work through all the coding examples and not just to read the text. Many times I have feel the examples given, designed for average programmer without additional experience, often has low abstraction level. I tried to improve them, including building some tools on myself. This unfortunately doomed me because I never have the time to build the tools or even just to work through the exercises in sufficient detail. This time around I feel that I have gained a lot of experience and have access to many tools like Pandas. I hope this will be an enjoyable exercise.

2012.12.17 [] - comments

 

 

blog comments powered by Disqus

past articles »

 

BBC News

 

Gulf of Oman: Saudi Arabia blames tanker attacks on rival Iran (15 Jun 2019)

 

Hong Kong extradition bill: Protesters vow to push ahead (15 Jun 2019)

 

Priests wear hard hats at Notre-Dame (15 Jun 2019)

 

Babe Ruth jersey fetches record-breaking .6m at auction (16 Jun 2019)

 

Sudan: Friends pay tribute to victim of Sudan protests (15 Jun 2019)

 

India announces retaliatory trade tariffs against the US (15 Jun 2019)

 

Nazanin Zaghari-Ratcliffe begins new hunger strike (15 Jun 2019)

 

Italian film director Franco Zeffirelli dies at 96 (15 Jun 2019)

 

Chris Froome 'fully focused' on return after high-speed crash (15 Jun 2019)

 

Amanda Knox feared attacks and accusations on return to Italy (15 Jun 2019)

more »

 

SF Gate

 

A digital helper that puts user privacy first (15 Jun 2019)

 

Savings accounts for disabled Americans catch on, but slowly (15 Jun 2019)

 

Come for a new alternator, stay for the salmon or a movie (15 Jun 2019)

 

Disney gets permits to create Marvel land (15 Jun 2019)

 

These are the best phones for (15 Jun 2019)

 

Drugmakers sue to block listing prices in TV ads (14 Jun 2019)

more »


Site feed Updated: 2019-Jun-15 18:00