Gmail Machine Learning

I just quickly tried the new Gmail Labs feature “Got the wrong Bob”? and it actually works quite nicely! I put some email addresses of family members, followed by the address of an old professor, who has the same first name of one of my cousins, and… Gmail found it! :) It suggested right way to change to the correct person, based on context!

The other new feature, called “Don’t forget Bob”, is probably simpler, but quite useful as well. As I typed names of some close friends, I got more suggestions of friends I often email jointly with the previous ones.
I wonder if the models to run this feature are very complicated. Probably they are not. I guess one just has to estimate the probability of each email address in our contacts to appear in the “To:” field, given the addresses we have already typed. To estimate these, you just have to use a frequentist approach and count how many times this happened in the past. With this in hands, “Got the wrong Bob?” will notice unlikely email addresses and “Don’t forget Bob” will suggest likely ones that are missing.

I think it’s a really cool idea, in the same spirit of “Forgotten Attachement Detector”. A bit of machine learning helping daily life!

OpenCV 2.0 and Boost library in Snow Leopard

Since I installed Snow Leopard on my macbook I started having compilation problems. The reason is that my code depends on a couple of external libraries, namely OpenCV and Boost serialization, and these were broken.

Today, I finally managed to solve the problems, by following some hints I found in different websites.
First, I installed OpenCV 2.0 (which should be quite cool because it has cleaner and compact notation for matrix computations, among other things). For this I basically followed the recommendations at:
For the small programs that only depended on OpenCV, things started to work again. But other pieces of code I am writing also use Boost serialization library, in order to save and load complex objects to disk.
Compilation was working, but linking was failing. Basically, the problem was that the libraries had been compiled for different architectures. My OpenCV library was built for “i686″, whereas my Boost library was built for x84_64 architectures. I had installed Boost using macports, which for Mac OS X 10.6, builds using x86_64 if the CPU supports it, or i386 otherwise.
You can change this at the macports.conf file by uncommenting the line:
#build_arch i386
In my case, I actually changed it to i686, because I don’t care too much about compatibility with older platforms.
build_arch i686
After that:

Schools kill creativity

My good friend Miguel called my attention to a TED talk that you might also find interesting:

Ken Robinson argues that “schools kill creativity”, because kids are not given the chance to discover their interests and talents. Since very soon, students get a negative reward for making mistakes, which makes them too risk averse. He goes further, saying that the educational system is built to create university professors, leaving the majority of the students behing along the way. More space should be given to other forms of expressing intelligence, such as the arts or sports.
I strongly recommend this video. Besides the interest of the subject, the presentation is actually quite funny, it somehow resembles a British-style stand-up comedy!