From fb1e03bfab8f6d612b9997bbd1e544fcc342cb2d Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Wed, 5 Oct 2022 21:50:16 +1100 Subject: [PATCH] Implement beta_ratio.from_scipy --- yli/distributions.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/yli/distributions.py b/yli/distributions.py index fdc2cf8..e9d7930 100644 --- a/yli/distributions.py +++ b/yli/distributions.py @@ -28,6 +28,10 @@ class betarat_gen(stats.rv_continuous): 2. Weekend Editor. On the ratio of Beta-distributed random variables. Some Weekend Reading. 2021 Sep 13. https://www.someweekendreading.blog/beta-ratios/ """ + def from_scipy(self, beta1, beta2): + """Construct a new beta_ratio distribution from two SciPy beta distributions""" + return self(*beta1.args, *beta2.args) + def _do_vectorized(self, func, x, a1, b1, a2, b2): """Helper function to call the implementation over potentially multiple values"""