-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expectation of PERT RV is taking forever #16983
Comments
It returns immediately on my system:
|
@jksuom I have implemented explicit function for expectation in the above code. If you comment out the function as I did in the issue, it will take forever. |
If the expectation is what you have commented out, why are you commenting it out? |
It seems that the incomplete beta integral is not implemented. (Long time is spent in meijerint and heurisch.) |
@smichr In continuous distributions in Yes, @jksuom incomplete beta integral is not implemented and I am working on it. Should be able to send PR soon. |
Here is the integral: from sympy import *
from sympy import beta as beta_fn
x, a, b, c = symbols('x, a, b, c')
alpha = (4*b + c - 5*a)/(c - a)
beta = (5*c - a - 4*b)/(c - a)
num = (x - a)**(alpha - 1)*(c - x)**(beta - 1)
den = beta_fn(alpha, beta)*(c - a)**5
integrand = num/den
pprint(integrand)
pprint(integrand.integrate((x, a, c))) # slow The integrand looks like
I've put the integration as going from a to c. Does expectation know that the pdf is zero outside of |
I have the following implementation of PERT distribution (see PR (#16970) and #16970 (comment))
But the following takes forever
Reason: Might be an issue with integrals (see #16970 (comment))
The text was updated successfully, but these errors were encountered: