Inverse problems in machine learning: an application to brain activity interpretation