QInfer / python-qinfer

Library for Bayesian inference via sequential Monte Carlo for quantum parameter estimation.
BSD 3-Clause "New" or "Revised" License
92 stars 31 forks source link

Feature custom meanfn #133

Closed dsuess closed 7 years ago

dsuess commented 7 years ago

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 and 1-a. In the Notebook I get around the problem by disabling postselection and by running cannonicalization afterwards.

BTW, Sorry for the unnecessary deleted whitespaces...

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.02%) to 73.857% when pulling 8061ae2a2a6fb947f8b74ed02ccfda2860580c4f on dseuss:feature-custom-meanfn into 4fd1e4aae9a6031b689e7cbdc6e54b46cd1bbbf5 on QInfer:master.

cgranade commented 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'.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.4%) to 74.194% when pulling 04370edd0840332a227eeb9f6a91dce866ab53a9 on dseuss:feature-custom-meanfn into 4fd1e4aae9a6031b689e7cbdc6e54b46cd1bbbf5 on QInfer:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.4%) to 74.194% when pulling 04370edd0840332a227eeb9f6a91dce866ab53a9 on dseuss:feature-custom-meanfn into 4fd1e4aae9a6031b689e7cbdc6e54b46cd1bbbf5 on QInfer:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.4%) to 74.194% when pulling 04370edd0840332a227eeb9f6a91dce866ab53a9 on dseuss:feature-custom-meanfn into 4fd1e4aae9a6031b689e7cbdc6e54b46cd1bbbf5 on QInfer:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.4%) to 74.194% when pulling 04370edd0840332a227eeb9f6a91dce866ab53a9 on dseuss:feature-custom-meanfn into 4fd1e4aae9a6031b689e7cbdc6e54b46cd1bbbf5 on QInfer:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.4%) to 74.194% when pulling 04370edd0840332a227eeb9f6a91dce866ab53a9 on dseuss:feature-custom-meanfn into 4fd1e4aae9a6031b689e7cbdc6e54b46cd1bbbf5 on QInfer:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.4%) to 74.194% when pulling 04370edd0840332a227eeb9f6a91dce866ab53a9 on dseuss:feature-custom-meanfn into 4fd1e4aae9a6031b689e7cbdc6e54b46cd1bbbf5 on QInfer:master.

scasagrande commented 7 years ago

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)

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.01%) to 74.182% when pulling d11aa126fa6935d1f2dbdc0bb835187ba403e558 on dseuss:feature-custom-meanfn into b4c4924c1b06453ff4aa35076e7eea982c8151e1 on QInfer:master.