Well in order to understand why all the components of c and d seem to same posterior distribution, I would run the model and try to understand what is going on. c and d seems to be initialized correctly as far as I can see. Maybe the functions are symmetric with respect to different components of c which could result in this?
Some things I can suggest:
-
Try to add stuff to these function that creates more asymmetry between components of c and d (like maybe just an expression that depends on c[0] etc) and see if that changes anything.
-
Use az.plot_posterior on maybe a subset of c to see really that their posteriors are identical (you seem to be using some custom plotting function which can often be the source of error). You can do it via
az.plot_posterior(trace.posterior[["c"]].sel({"group": [0,1]}))
- You can also sample pairwise differences between components of c and d to see if on average they are different or not via stuff like:
pm.Deterministic("difc", c[:,None] - c[:,None].transpose())
-
Obviously also do az.plot_pcc (after pm.sample_posterior_predictive) to see if your model is fitting reasonably well.
-
Can you generate simulated data with c and d having different components? So you can check whether or not you recover the true parameters.