Using bayesian to build a TAN, which is then used for inference