PyGSL 中的 gsl_cdf_beta_Pinv() 在哪里?

发布于 2024-08-20 06:07:05 字数 128 浏览 4 评论 0原文

我正在尝试在Python程序中使用分布函数(我已经弄清楚的随机函数;我正在专门寻找gsl_cdf_beta_Pinv()),但我找不到它。有人可以告诉我如何在程序中使用这些或快速替代方案吗?

谢谢,

马克·查。

I'm trying to use the distribution functions in a Python program (the random functions I've got figured out; I'm looking specifically for gsl_cdf_beta_Pinv()) and I can't find it. Can someone tell me how I can use these or a fast alternative in a program?

Thanks,

Mark Ch.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

白况 2024-08-27 06:07:05

它在此 Cython 源中定义文件(对于模块probability_distribution),当其self时,由类RealDistribution实例的方法cum_distribution_function_inv进行调解.distribution_type==beta。所以你应该导入模块,实例化类,然后调用方法——例如,

from gsl import probability_distribution
thebeta = probability_distribution.RealDistribution(type='beta',
                                                    parameters=[alpha, beta])
print thebeta.cum_distribution_function_inv(0.1)

我手头没有安装 GSL 来测试这段代码(所以这里可能有一些小细节错误!)但我确实希望这样为您指明正确的方向。

It's defined in this Cython source file (for module probability_distribution) as being mediated by the method cum_distribution_function_inv of an instance of class RealDistribution when its self.distribution_type==beta. So you should import the module, instantiate the class, and then call the method -- e.g.

from gsl import probability_distribution
thebeta = probability_distribution.RealDistribution(type='beta',
                                                    parameters=[alpha, beta])
print thebeta.cum_distribution_function_inv(0.1)

I don't have a GSL installation at hand to test this code (so there might be some minor detail wrong here!) but I do hope this points you in the right direction.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文