Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

My take at converting the python code from the O'Reilly book by Toby Segaran to my language of choice

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 chapter2
Octocat-spinner-32 lib
Octocat-spinner-32 README.textile
README.textile

This is my attemt to port the code examples from “Programming Collective Intelligence” by Toby Segaran from O’Reilly to ruby.

I try not to stupidly port the stuff, but also try to use ruby idioms and best practices wherevever possible.

Changelog

  • [19.04.2008] – Did some housekeeping. First of all, to make the code as accessible as possible, I converted the python shell stuff into unit tests. I also tried to set up a clever way to load monkey patches such as my Array.sum stuff. YMMV.
  • [19.04.2008] – Implemented the ranking stuff aka top_matches and recommendations
  • [27.04.2008] – Fixed another minor data error, implemented the transformation for the product finder (investigated del.icio.us API’s for ruby. That IS a MESS.)

Status

  • Chapter 2
    • Euclidean Distance Score – finished
    • Pearson-Coefficient – finished
    • Ranking aka top_matches – finished
    • Recommendations – finished (recommendations with sim_distance somehow returns different values (but in correct order) – need to investigate)
    • Finding Products (transforming) – finished

Errata

(a short collection of errors I encountered on my way through the book – if not stated otherwise, they are also present in the official oreilly errata collection.)

  • Chapter 2
    • Both example code AND result from the euclidean distance score are broken. The code in the book contains syntax errors (and the given similarity score for Lisa Rose and Gene Seymour is wrong). The example code from the website misses out the final sqrt() on the sums, but delivers, tadaa, the wrong result contained in the book.
Something went wrong with that request. Please try again.