Turn off "KDE plot failed" from traceplot

When (vector-valued) posterior distributions contain entries which are constrained (e.g. off-diagonal components of a diagonal matrix), and thus have no standard deviation,
pm.traceplot can generate an ugly warning box that one or more of the variables wasn’t actually plotted:

But just because one component failed to plot doesn’t mean I’m not interested in what the others look like. Is there a way to turn this feature off?

We recently switched to arviz for plotting, which means it will now plot each dimension of every RV individually. Currently, you cannot plot everything today in one plot: https://github.com/arviz-devs/arviz/issues/94

Not sure how arviz handles KDE plot failed @RavinKumar, @aloctavodia?

KDE will fail if all the elements of the input array are nan or inf or exactly the same number, or very short array (less than 3 or so). trace_plot will fail for those case too, only variables before the failing point will be plotted. I will send a PR to better deal with these cases.

I think printing a warning for those cases and skip them should do.

1 Like