Thank you @Elchorro and @fehiepsi ! I am beginning to get some clarity.
@fehiepsi, while I understand that model
is just a python function and can return anything, the reason I asked that is because model
is used to build the NUTS kernel. Hence, I was wondering if something specific needs to be returned. Does the kernel look for all sample
statements and decide whether the given statement is a prior or not based on the obs
keyword?
If I want to define the likelihood function to be $e^{-(model - data)^2/variance}$, do I simply change the sample
call to numpyro.sample("y", dist.Normal(mu, 1e-6*np.ones_like(y)), obs=y)
? (In the synthetic data used for the problem, the data is taken to have a standard deviation of 1e-3 for all data points)