Code for the Kaggle DecMeg2014 competition