bayesmix-dev / bayesmix

Flexible Bayesian nonparametric mixture models in C++
https://bayesmix.rtfd.io
BSD 3-Clause "New" or "Revised" License
22 stars 18 forks source link

Thesis tests #63

Closed brunoguindani closed 3 years ago

brunoguindani commented 3 years ago

Sorry to bother, I'd like some piece of advice on the Pitman-Yor mixture. Tests are almost completely ready and, incidentally, looking pretty good IMO!, even though Neal3 sucks (but it was to be expected). But, there is an issue with Pitman-Yor estimations. Basically some of the iterations give density estimates filled with -nans. Note that this only happens with PY and not in every iteration (grep tells me it's about 300 iterations out of the total 6*900 across all files), but it happens in all 6 combinations involving PY: datasets galaxy and faithful, with Neal2, Neal3, and Neal8.

I was thinking that maybe it has to do with parameter values. I'm using strength = 1.0 and discount = 0.1, are they sensible values? What other values should I try? I'm asking you because each run takes a very long time, so I really can't afford to run all possible combinations.

By the way, if you have any graphical advice for these plots, please do tell me. I was trying to use plot_surface() instead of scatter() for the 3D plot because it looks nicer, but it requires a different format for coordinates (X, Y, and Z must be 2D matrices as they are supposed to work with meshgrids), and I couldn't make it work. Some website promised that a 3-column matrix (X, Y, Z) was also a valid input, but it didn't work. But I can keep scatter() if it looks fine.