Code for Kaggle DecMeg 2014 competition