how can I find the value of x at which the following gamma function is at its maximum see function
I wonder if there is a simple method with one of the libraries that could do this easily for me.
Ps. I'm considering the tranformation z=x/(x+c)
Thanks
Are you looking for a library that can find (an approximation of) a local minimum in a given interval ? scipy.optimize.minimize_scalar
can do that. (For the maximum, just negate your function).
Edit: minimize_scalar
is better than minimize
in your case, since you only have one variable.
For the function to pass in, instead of integrating yourself, I believe you can use scipy.stats.gamma.cdf
).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.