I have some multivariate data which doesn’t match well with any of the usual parametric distributions because of nonlinear correlations between variables. I’m thinking of trying to fit a normalizing flow model to the raw data samples and then using this as a likelihood for inferring the parameters of a latent variable model. I see that pymc3 has some NF capabilities but is it possible to use a fitted NF model as a likelihood in another model?
Hi Colin,
Did you find a way to use the fitted NF function as likelihood?
No I never did unfortunately. Instead I assume the raw data is multivariate normal, use these closed form expressions to fit a posterior distribution to the data (which is a multivariate T), and then use that for the custom likelihood on the latent variable model. I was able to deal with the nonlinear correlations I mention with some variable transformations that seem good enough for now but it would still be interesting to try the NF idea