Hi,
I am trying to model two time series (columns of observed
) as Gaussian Random Walks with a drift that is a function of a linear regression. Everything works fine except when it comes to inspection and prediction.
with model:
packed_L = pm.LKJCholeskyCov('packed_L', n=shape, eta=2, sd_dist=pm.HalfCauchy.dist(2.5))
L = pm.expand_packed_triangular(shape, packed_L)
Σ = pm.Deterministic('Σ', L.dot(L.T))
one_mu = mu_variable(f_data, 'one') # linear combination of regressor and regressor beta
two_mu = mu_variable(f_data, 'two')
mu = T.stack([eps_mu, pe_mu]).T
obs = pm.MvGaussianRandomWalk('obs', mu=mu, chol=L, observed=target)
trace = pm.sample(3000, cores=1)
trace['obs']
KeyError: 'Unknown variable obs'
I would like to visually inspect how the model performed. In the stochastic volatility model the author simple inspect the trace. However, in this case, the trace does not have an “obs” variable.
How can I check what the model predicted against the observed time series?
Many thanks,
Maxime.