Suppose I have a model that has observed data sampled from a custom distribution with a non-differentiable likelihood. Would it be feasible to compute the gradient via a finite difference method and then run inference on that model with SVI or HMC? What would that take to implement?
This is possible in PyMC: Using a “black box” likelihood function (numpy) — PyMC example gallery