All Projects β†’ astralord β†’ RandLib

astralord / RandLib

Licence: MIT license
πŸš€ A library designed to facilitate work with probability, statistics and stochastic calculus

Programming Languages

C++
36643 projects - #6 most used programming language
QMake
1090 projects
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to RandLib

jRand
A Java library to generate random data for all sorts of things. Java random data faker
Stars: ✭ 27 (-57.81%)
Mutual labels:  random, random-number-generators
datagen
Java lib that generates random data (numbers, strings, dates) - mostly to facilitate Randomized Testing.
Stars: ✭ 56 (-12.5%)
Mutual labels:  random, random-number-generators
Probability Theory
A quick introduction to all most important concepts of Probability Theory, only freshman level of mathematics needed as prerequisite.
Stars: ✭ 25 (-60.94%)
Mutual labels:  mathematics, probability-theory
random
The most random module on npm
Stars: ✭ 106 (+65.63%)
Mutual labels:  random, normal-distribution
Librmath.js
Javascript Pure Implementation of Statistical R "core" numerical libRmath.so
Stars: ✭ 425 (+564.06%)
Mutual labels:  random, mathematics
prvhash
PRVHASH - Pseudo-Random-Value Hash. Hash functions, PRNG with unlimited period, randomness extractor. (Codename Gradilac/Π“Ρ€Π°Π΄ΠΈΠ»Π°ΠΊ)
Stars: ✭ 194 (+203.13%)
Mutual labels:  random, random-number-generators
RNG
A simple state-of-the-art C++ random number generator
Stars: ✭ 19 (-70.31%)
Mutual labels:  random, random-number-generators
javascript-strong-password-generator
JavaScript Strong Password Generator: based on Jeff Atwood's Post "Password Rules Are Bullshit".
Stars: ✭ 21 (-67.19%)
Mutual labels:  random, random-number-generators
SDETools
Matlab Toolbox for the Numerical Solution of Stochastic Differential Equations
Stars: ✭ 80 (+25%)
Mutual labels:  random, stochastic
order-id
Unique order id generator
Stars: ✭ 46 (-28.12%)
Mutual labels:  random
qmc
A Quasi-Monte-Carlo Integrator Library with CUDA Support
Stars: ✭ 17 (-73.44%)
Mutual labels:  mathematics
nmu
neg4n's mathematics utilities
Stars: ✭ 17 (-73.44%)
Mutual labels:  mathematics
awesome-conformal-prediction
A professionally curated list of awesome Conformal Prediction videos, tutorials, books, papers, PhD and MSc theses, articles and open-source libraries.
Stars: ✭ 998 (+1459.38%)
Mutual labels:  probability-distributions
LSMLIB
Level Set Method Library
Stars: ✭ 67 (+4.69%)
Mutual labels:  mathematics
ARFIMA.jl
Simulate stochastic timeseries that follow ARFIMA, ARMA, ARIMA, AR, etc. processes
Stars: ✭ 44 (-31.25%)
Mutual labels:  stochastic
gt
Source files for my course on Game Theory.
Stars: ✭ 28 (-56.25%)
Mutual labels:  mathematics
Mathos-Project
The Mathos Core Library
Stars: ✭ 22 (-65.62%)
Mutual labels:  mathematics
Mathematics for Machine Learning
Learn mathematics behind machine learning and explore different mathematics in machine learning.
Stars: ✭ 28 (-56.25%)
Mutual labels:  mathematics
simulate
A collection of simulations and visualizations for all sorts of stuff (Majorly Algorithmic or Mathematical)
Stars: ✭ 82 (+28.13%)
Mutual labels:  mathematics
math
Complex special functions and common mathematical operations in JavaScript
Stars: ✭ 42 (-34.37%)
Mutual labels:  mathematics

RandLib

Build Status CodeFactor

With RandLib one can easily work with probability distributions. One of the major advantages of this library (apart from being free and open-source) is that it doesn't require any additional packages. All you need is C++17 compiler support.

What can be done via RandLib? Here are some useful examples:

  • Fast sampling. For instance, generate million variates from standard normal distribution:
NormalRand X(0, 1);
std::vector<double> data(1e6);
X.Sample(data);

alt tag

  • Calculate moments and other properties:
LogNormalRand X(1, 1);
std::cout << " Mean = " << X.Mean()
          << " and Variance = " << X.Variance()
          << "\n Median = " << X.Median()
          << " and Mode = " << X.Mode()
          << "\n Skewness = " << X.Skewness()
          << " and Excess kurtosis = " << X.ExcessKurtosis();

alt tag

Mean = 4.48169 and Variance = 34.5126
Median = 2.71828 and Mode = 1
Skewness = 6.18488 and Excess Kurtosis = 110.936
  • Fitting parameters using different estimators:
using std::cout;

NormalRand X(0, 1);
std::vector<double> data(10);
X.Sample(data);
cout << "True distribution: " << X.Name() << "\n";
cout << "Sample: ";
for (double var : data)
    cout << var << "  ";
cout << "\n";

/// Bayesian estimation
NormalInverseGammaRand prior(0, 1, 1, 1);
NormalInverseGammaRand posterior = X.FitBayes(data, prior);
cout << "Bayesian estimator: " << X.Name() << "\n";
cout << "(Posterior distribution: " << posterior.Name() << ")\n";

/// Uniformly minimum variance unbiased estimator
X.Fit(data, true);
cout << "UMVU estimator: " << X.Name() << "\n";

/// Maximum-likelihood estimator
X.Fit(data);
cout << "Maximum-likelihood estimator: " << X.Name() << "\n";

alt tag

True distribution: Normal(0, 1)
Sample: -0.328154  0.709122  -0.607214  1.11472  -1.23726  -0.123584  0.59374  -1.20573  -0.397376  -1.63173
Bayesian estimator: Normal(-0.283042, 0.951348)
(Posterior distribution: Normal-Inverse-Gamma(-0.283042, 11, 6, 4.75674))
UMVU estimator: Normal(-0.311347, 0.82504)
Maximum-likelihood estimator: Normal(-0.311347, 0.742536)

For documentation look up here

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].