test(distributions): add missing scipy logcdf and icdf tests for LogitNormal, Kumaraswamy, and ChiSquared - #8397
Conversation
…tNormal, Kumaraswamy, and ChiSquared
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8397 +/- ##
=======================================
Coverage 91.87% 91.87%
=======================================
Files 128 128
Lines 21256 21256
=======================================
Hits 19530 19530
Misses 1726 1726 🚀 New features to boost your workflow:
|
ricardoV94
left a comment
There was a problem hiding this comment.
This PR is 2 misses and maybe 1 hit. Please don't open PRs in search of a motivation.
| lambda value, nu: st.chi2.logcdf(value, df=nu), | ||
| ) | ||
|
|
||
| def test_chisquared_icdf(self): |
There was a problem hiding this comment.
This is just a gamma parametrization, no point in spending CI cycles retesting it
| ), | ||
| decimal=select_by_precision(float64=6, float32=1), | ||
| ) | ||
| check_logcdf( |
There was a problem hiding this comment.
This is just a customdist with automatically derived logcdf, no point in spending cycles retesting it.
|
Hi @ricardoV94, |
| {"a": Rplus, "b": Rplus}, | ||
| scipy_log_cdf, | ||
| ) | ||
| check_icdf( |
There was a problem hiding this comment.
actually we have the check_selfconsistency_icdf. The reason we didn't have this tset was scipy doesn't have it so we don't have a great "ground truth", that's better than what check_selfconsistency_icdf already does
|
No worries @sankhyanreyansh. Apologies for my rudeness |
Description
This PR adds missing unit test coverage in
tests/distributions/test_continuous.pyunderTestMatchesScipyto verify PyMC distribution functions against SciPy and analytical quantile formulations:check_logcdfforLogitNormalagainstscipy.stats.norm.logcdf(scipy.special.logit(x), mu, sigma).check_icdfforKumaraswamyagainst its analytical quantile functioncheck_icdfforChiSquaredagainstscipy.stats.chi2.ppf.Related Issue
Checklist
Type of change