astralord / randlib Goto Github PK
View Code? Open in Web Editor NEW:rocket: A library designed to facilitate work with probability, statistics and stochastic calculus
License: MIT License
:rocket: A library designed to facilitate work with probability, statistics and stochastic calculus
License: MIT License
Lines 34 to 41 in fff1119
There is no way these values could be properly represented as the long double
type you defined them as. See this article from GeeksforGeeks for a simple reference on why this occurs and how this could be affecting your intended values. And this StackOverflow post is pertinent because of the type declaration.
I don't know if this is directly pertinent to you, depending on what platforms you want to support. If it's not feel free to close the issue.
There are a multitude of places throughout the code base that use the identifier constexpr
, but make calls to std::pow
, std::log
, and std::sqrt
in the definitions. These are not actually defined as constexpr
in the c++ standard (see this stackoverflow post) and as such any standard compiler other than GCC will throw errors when trying to compile the library.
I have made a workaround for this on my personal fork of this repository using a few header only files from the kthohr/gcem library. I don't know if you want to bring in external libraries but it is at least worth looking at if you need a launch point. Likewise, you are welcome to review my fork for reference. If you want I will be happy to open a pull request from that fork here, but there are significant modifications to the structuring and include paths on mine (It's currently a work in progress).
logarithm of modified Bessel function of the first and second kind
lower and upper incomplete gamma functions (and their logarithms)
Marcum-Q and Marcum-P functions
erfinv and erfcinv
incomplete beta function
Most of the properties of log-stable distribution are easy to derive using the relationship with stable distribution. However, the problem arises with characteristic function, which can't be expressed analytically and is hard to compute numerically due to singularity of probability density function at point 0 in some cases (e.g. Log-Cauchy distribution). All ideas are welcome.
We integrate numerically on semi-finite interval in order to get CF of LogNormalRand. However, there exist at least two more ways to do it:
auto [a, b, c] = array
std::tie(a, b, c) = array
temp
variables)Find n and p (very small), such that BinomialRand variate generator can be replaced with PoissonRand generator
maximum likelihood fit: f(a-eps) < f(a) < f(a+eps)
mode value: f(x-eps) < f(x) < f(x+eps)
pdf and logpdf coherence: f(x) = exp(logf(x))
The problems are with
On line 533 of StableRand.cpp
the variable theta0
is uninitialized when used 2 lines later.
cloned this repository.
But in Qt creator has problem : no viable constructor or deduction guide for deduction of template arguments of 'NormalRand';
Wrote code according your manual
NormalRand X(0, 1);
std::vector data(1e6);
X.Sample(data);
Implement different numerical integration algorithms (e.g. adaptive Gauss-Kronrod quadrature) and apply in appropriate cases
e.g. is it possible to calculate the pdf of a normal distribution (and store it in a vector)?
Use Fit() for MLE and Fit(unbiased = true) for UMVU. Remove method of moments
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.