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

Correct small negative eigenvalues in covariance #152

Open mikedeltalima opened 4 years ago

mikedeltalima commented 4 years ago

https://github.com/QInfer/python-qinfer/issues/151

Doesn't fail existing tests, but should add a test for this. Could revert some of the auto-whitespace removal if desired.

Deprecated version of the method in utils.py. Should update this as well?

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.04%) to 75.592% when pulling 9363f608a14fe596b98b5dd8e26d62811871ba0c on mikedeltalima:covariance-warn into 8170c84a0be1723f8c6b09e0d3c7a40a886f1fe3 on QInfer:master.

mikedeltalima commented 4 years ago

This fixes a warning in an existing test, so I am not going to add a new test unless one is suggested.

src/qinfer/tests/test_smc.py::TestSMCEffectiveSampleSize::test_resample_thresh
  /Users/mdlauria/gitSource/python-qinfer/src/qinfer/distributions.py:397: ApproximationWarning: Numerical error in covariance estimation causing positive semidefinite violation.
    warnings.warn('Numerical error in covariance estimation causing positive semidefinite violation.', ApproximationWarning)