Supervised learning for input-output data