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

Small corrections + README updates #90

Closed brunoguindani closed 2 years ago

brunoguindani commented 2 years ago

I feel that code-changing cleanup, which is not merely adding docstrings and switching functions around, however small, deservs its own pull request. Besides updated docstrings, formatting, and function order, changes fall in one of the following categories, mainly affecting hierarchies:

Moreover, there's one more thing to discuss. In BaseHierarchy we have get_posterior_hypers() which is a simple getter, while in individual derived hierarchies we have get_posterior_parameters(), which also returns posterior hypers but after computing them in a posterior update. Should we rename get_posterior_parameters()? Maybe to compute_posterior_hypers()?

EDIT: Whoops, I just read your hierarchy README. There was a reason for some methods not to be virtual after all. I'll revert back some changes.

mberaha commented 2 years ago

Moreover, there's one more thing to discuss. In BaseHierarchy we have get_posterior_hypers() which is a simple getter, while in individual derived hierarchies we have get_posterior_parameters(), which also returns posterior hypers but after computing them in a posterior update. Should we rename get_posterior_parameters()? Maybe to compute_posterior_hypers()?

Yes this sounds a good name!!

brunoguindani commented 2 years ago

I should be done :)