문제

I need to use beta distribution and inverse beta distribution in my project.

There is quite good but complicated implementation in GSL, but I don't want to use such a big library only to get one function.

I would like to either, implement it on my own or link some simple library. Do you know any sources that could help me? I'm looking for any books/articles about numerical approximation of beta CDF and its inverse, libraries where it could be implemented. Any other suggestions would be also appreciated.
Any programming language, but C++/C# preffered.

도움이 되었습니까?

해결책 2

Well, I found some other libraries/implementations:

  1. Boost library for C++
  2. Some code in C# at google code
  3. And simple but not exactly perfect implementation of inverse beta cdf

다른 팁

Here is a managed C++ library that has the beta CDF and its inverse: DCDFLIB. It's a port of the popular Fortran/C library of the same name. If you have questions about how to use the code, I'm familiar with it and can help.

You could take DCDFLIB and delete what you don't use, but it's still going to be big. Implementing the beta CDF and its inverse accurately for a wide range of parameters is complicated.

Fifteen seconds of googling lead to this page at fsu.edu with code for the CDF of the non-central Beta distribution in several languages.

That said, I'd re-consider your stance on the GNU GSL as that is also a pretty high-quality and well-vetted library.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top