Simplifies some of the analytic 1D likelihoods
@colm.talbot @matthew-pitkin @gregory.ashton
I created a superclass for the analytic 1D likelihoods that @matthew-pitkin recently introduced. It reduces some code redundancies. I called the superclass _Analytic1DLikelihood
. It is private because the class because users should never instantiate it.
Edited by Moritz Huebner
Merge request reports
Activity
added 25 commits
- d6feb0a3 - Made Analytical1DLikelihood public again
- 071fcbdd - Removed an alias and refactored a key
- 21ecf70c - Reformatted file
- d2990851 - Deleted redundant tests
- 5cbdd850 - Split a test into two
- e359092c - Added tests for Analytical1DLikelihood
- 2be27fac - Extracted two private methods
- 964e86b8 - Refactored code some more in GaussianLikelihood
- 7e7795f7 - Refactored code some more
- dde1ee41 - Shifted y setting logic into a property/setter structure
- 2ac8f384 - Added check that x, y in Analytical1DLikelihoods are always numpy arrays
- 53871d3f - Created two properties for the rate and the sumlogfactorial respectively.…
- e59da276 - Renamed a property
- d6127a83 - Fixed a bug I just introduced
- 42a042c2 - Introduced a mu property and simplified ExponentialLikelihood
- 8d106493 - Some more reformatting
- 280fd8fb - Moved the calculation of the residual into the parent class
- 3bfac960 - Refactored some more
- 3e43896d - Removed the residual aliases and replaced them accordingly
- 6fb97e69 - Added the possibility of x or y being a single float
- 130ddc5c - Added some docstrings
- a4c837a9 - Added some more docstrings and refactored some more
- 17d04bf1 - Fixed errors I introduced myself
- 251472b9 - Removed some of the slower and unnecessary properties
- faf745d3 - Renamed function -> func
Toggle commit listadded 10 commits
- dcd3be7b - Added tests for Likelihood base class
- 21f2372c - Added tests for setting x and y
- a40c6ea5 - Made logic a bit safer for obscure data types
- 75705732 - Simplified test syntax
- ed41d915 - Tests cases of `PoissonLikelihood`
- 7ca8c69c - Corrected an incorrect cast
- 61cc31c2 - Tests cases of `ExponentialLikelihood`
- f833301b - Added test for default case of `ExponentialLikelihood.log_likelihood`
- 06261851 - Changed a comment
- 38cc1332 - Added some more tests for 100 % coverage.
Toggle commit list@matthew-pitkin I added some tests so that we achieve 100 % coverage for the core.likelihood module. I changed quite a bit but I think it should be alright, could you have a look and see that especially the log_likelihood evaluations are still fine?
mentioned in merge request !153 (merged)
mentioned in commit d52b5aff
Please register or sign in to reply