KDE failed at 0 : How to debug - Example

I updated pymc3 using master. The previous examples worked fine with that. I ran the ‘How to debug a model’


When I put

sd = pm.Normal(‘sd’, mu=0, sd=1)

The plots fail saying: KDE failed at 0. If I change the value of mu to any non zero it works fine.

Further, the last plot after the last input is totally blank as against to the expected line graph.

My implementation -

Not sure if I understand what you mean, but this is kind of the point of this example notebook that all the proposal value is rejected, and you ends up with a trace containing only the initial value (0 in this case). KDE plot fail as there are only one unique value.

1 Like

Okay, yeah right. Thanks. I’m sorry. I Didn’t read properly.

And in the last example. There is no plot in that as against to the line graph that is expected.

You are right. The StringIO is not working properly and the notebook needs to be updated as well. PR welcome :wink:

1 Like

I’d like to know though what was supposed to be the graph’s content i.e. the y-axis? It has values ranging from -5 to +3.

My idea is that if we change this line of code right here
mulines = [s for s in output if ‘mu’ in s]

we can get a better graph.

PS: I am not able to post any images, code etc with my posts. I can’t understand why.

y-axis representing the value of mu. I think here the values are the original value, the proposed value and the accepted value (printed 3 values per iteration). But I dont think changing the mulines would help, I am not too familiar with I/O but seems the output is not recorded properly.