Hello, i’m a bit lost in the reasoning of the svi even after reading the tutorial and i am seeking for help…

I want to do time serie forecasting, without using the forecaster class as i need more liberty. I have a time serie, I learn on the past of the serie and I want to predict the next day…

So I have the time serie \{y_i\}_{0 \leq i\leq T}, I then pose X_T = \{y_i\}_{0 \leq i \leq T-1} = \{x_i\}_{1 \leq i \leq T} and Y_T = \{y_i\}_{1 \leq i \leq T}. I then want to compute \displaystyle p\big(y_{t+1} \big|\{y_i\}_{i\leq t}\big) = p\big(y_{t+1} \big|x_{t+1},\big(Y_t, X_t\big)\big) = \int_{\theta'}p\big(y_{t+1}\big|x_{t+1}, \theta'\big) \cdot p\big(\theta'\big|\big(Y_t, X_t\big)\big)\, \mathrm{d}\theta' And to do so I have as definition of the posterior \displaystyle p\big(\theta\big|\big(Y_t, X_t\big)\big) = p\big(\theta\big|\{y_i\}_{i\leq t }\big) = \frac{p\big(Y_t\big|X_t, \theta \big) p(\theta)}{ \displaystyle \int_{\theta'}p\big(Y_t\big|X_t, \theta'\big) ~ p(\theta')\, \mathrm{d}\theta'}

Okay so my prior p(\theta), is the model, I understand.

But how is the likelihood computed, the p\big(Y_t\big|X_t, \theta \big), or p\big(y_{t+1}\big|x_{t+1}, \theta\big). At first I thought it was the guide but it’s already taken, so how is the likelihood computed because we need it when we are using a Predictive object ???

Then the evidence is intractable, this is why there is a need of a guide to approximate the posterior…

But in my formula of the ELBO, I have \displaystyle ELBO = \int_{\theta '} q_\phi(\theta ') \cdot log \Bigg( \frac{p\big(\theta ' , (X_t, Y_t)\big)}{q_\phi (\theta ' )}\Bigg) ~ d\theta ' okay, here the guide is the approached posterior, it’s q_\phi (\theta) but then how is computed p\big(\theta ' , (X_t, Y_t)\big) is it decomposed into p(X_t,Y_t) \cdot p(\theta |X_t, Y_t) ???

How come the elbo optimizes both the parameters \theta and \phi given that the prior doesn’t evolve during the training, for me the backpropagartion is only done on the \phi, even if it’s parameterized by the \theta

Thank you very much and have a great day