Unifying brain theories of cortical function often describe the brain as a prediction machine, based on a generative model (given X, what's the probability of Y). In this context, from Bayesian perspective, our brain attempts to infer hidden causes about what is perceived through sensory organs (I see a ball about to hit me (X), who threw it (Y)).
A similar thought is presented in predictive coding, where the brain would 'predict' what will happen in the future, or what happened in the past. ('I see a ball about to hit me (X), I predict it was thrown by Y')
Intuitively (and colloquially speaking), predictions and causes are orthogonal to me - but in this context they seem remarkably equivalent. Are they different, and if so, how?