Implement beta_ratio.from_scipy

This commit is contained in:
RunasSudo 2022-10-05 21:50:16 +11:00
parent 006ddd2c41
commit fb1e03bfab
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -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/ 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): def _do_vectorized(self, func, x, a1, b1, a2, b2):
"""Helper function to call the implementation over potentially multiple values""" """Helper function to call the implementation over potentially multiple values"""