Closed dsuess closed 7 years ago
Thanks for the PR! Sorry I've been a bit slow on the review, but I'll take a look now and add my thoughts to @ihincks'.
For those suffering like me to see the changes past all the whitespace, add ?w=1
to the end of the diff url
(ie https://github.com/QInfer/python-qinfer/pull/133/files?w=1)
This is a first suggestion how to move all the particle mean/covariance related logic into the
ParticleDistribution
class itself. This allows the user to provide his/her own moment-computing functions as show in this Notebook.I have not touched the clustering-resampler related stuff so far since this is work in progress. Once we have agreed on the right interface, this can certainly be done.
The other place that should be fixed is how the LW resampler combines the two resampling strategies here. For each particle, this is a mean over two (virtual) particles with weights
a
and1-a
. In the Notebook I get around the problem by disabling postselection and by running cannonicalization afterwards.BTW, Sorry for the unnecessary deleted whitespaces...