Learning from the past to better predict the future