PDFLIB
Evaluate and Sample Probability Density Functions
PDFLIB
is a Python library which
evaluates Probability Density Functions (PDF's)
and produces random samples from them,
including beta, binomial, chi, exponential, gamma, inverse chi,
inverse gamma, multinomial, normal, scaled inverse chi, and uniform.
Licensing:
The computer code and data files made available on this
web page are distributed under
the GNU LGPL license.
Languages:
PDFLIB is available in
a C version and
a C++ version and
a FORTRAN90 version and
a MATLAB version and
a Python version.
Related Data and Programs:
LOG_NORMAL_TRUNCATED_AB,
a Python library which
returns quantities associated with the log normal Probability
Distribution Function (PDF) truncated to the interval [A,B].
PROB,
a Python library which
evaluates, samples, inverts, and characterizes a number of
Probability Density Functions (PDF's)
and Cumulative Density Functions (CDF's), including anglit, arcsin,
benford, birthday, bernoulli, beta_binomial, beta, binomial, bradford,
burr, cardiod, cauchy, chi, chi squared, circular, cosine, deranged,
dipole, dirichlet mixture, discrete, empirical, english sentence and
word length, error, exponential, extreme values, f, fisk, folded normal,
frechet, gamma, generalized logistic, geometric, gompertz, gumbel,
half normal, hypergeometric, inverse gaussian, laplace, levy, logistic,
log normal, log series, log uniform, lorentz, maxwell, multinomial,
nakagami, negative binomial, normal, pareto, planck, poisson,
power, quasigeometric, rayleigh, reciprocal, runs, sech, semicircular,
student t, triangle, uniform, von mises, weibull, zipf.
RNGLIB,
a Python library which
implements a random number generator (RNG) with splitting facilities,
allowing multiple independent streams to be computed,
by L'Ecuyer and Cote.
WALKER_SAMPLE,
a Python library which
efficiently samples a discrete probability vector using
Walker sampling.
Source Code:
-
i4_binomial_pdf.py,
evaluates the binomial PDF.
-
i4_binomial_sample.py,
generates a binomial random deviate.
-
i4_uniform_ab.py,
returns a random I4 between A and B.
-
i4vec_multinomial_pdf.py,
evaluates the multinomial PDF.
-
.i4vec_multinomial_sample.py,
generates a multinomial random deviate.
-
r8_beta_pdf.py,
evaluates the PDF of a beta distribution.
-
r8_beta_sample.py,
generates a beta random deviate.
-
r8_chi_pdf.py,
evaluates the PDF of a chi square distribution.
-
r8_chi_sample.py,
generates a chi square random deviate.
-
r8_choose.py,
computes the binomial coefficient C(N,K) as an R8.
-
r8_exponential_01_pdf.py,
PDF of a standard exponential distribution.
-
r8_exponential_01_sample.py,
samples the standard exponential PDF.
-
r8_exponential_pdf.py,
PDF of a general exponential distribution.
-
r8_exponential_sample.py,
samples the general exponential PDF.
-
r8_gamma_01_pdf.py,
evaluates the PDF of a standard gamma distribution.
-
r8_gamma_01_sample.py,
samples the standard gamma distribution.
-
r8_gamma_log.py,
evaluates the logarithm of the gamma function.
-
r8_gamma_pdf.py,
evaluates the PDF of a gamma distribution.
-
r8_gamma_sample.py,
generates a gamma random deviate.
-
r8_invchi_pdf.py,
evaluates the PDF of an inverse chi-squared distribution.
-
r8_invchi_sample.py,
samples an inverse chi-squared distribution.
-
r8_invgam_pdf.py,
evaluates the PDF of an inverse gamma distribution.
-
r8_invgam_sample.py,
samples an inverse gamma distribution.
-
r8_normal_01_pdf.py,
evaluates the PDF of a standard normal distribution.
-
r8_normal_01_sample.py,
returns a unit pseudonormal R8.
-
r8_normal_pdf.py,
evaluates the PDF of a normal distribution.
-
r8_normal_sample.py,
generates a normal random deviate.
-
r8_scinvchi_pdf.py,
PDF for a scaled inverse chi square distribution.
-
r8_scinvchi_sample.py,
sample a scaled inverse chi square distribution.
-
r8_uniform_01_pdf.py,
evaluates the PDF of a standard uniform distribution.
-
r8_uniform_01_sample.py,
generates a uniform random deviate from [0,1].
-
r8_uniform_ab.py,
returns a scaled pseudorandom R8.
-
r8_uniform_pdf.py,
evaluates the PDF of a uniform distribution.
-
r8_uniform_sample.py,
generates a uniform random deviate.
-
r8ge.py,
functions to apply to a matrix stored in the R8GE format
used for general matrices.
-
r8mat_norm_fro_affine.py,
returns the Frobenius norm of the difference of two R8MAT's.
-
r8mat_uniform_01.py,
returns a unit pseudorandom R8MAT.
-
r8po.py,
functions to apply to a matrix stored in the R8PO format
used for positive definite symmetric matrices.
-
r8ut.py,
functions to apply to a matrix stored in the R8UT format
used for upper triangular matrices.
-
r8vec_indicator1.py,
sets an R8VEC to the indicator1 vector.
-
r8vec_multinormal_pdf.py,
evaluates a multivariate normal PDF.
-
r8vec_multinormal_sample.py,
samples a multivariate normal PDF.
-
r8vec_norm.py,
computes the L2 norm of an R8VEC.
-
r8vec_print.py,
prints an R8VEC.
-
r8vec_uniform_01.py,
returns a random R8VEC with values in [0,1].
-
r8vec_uniform_ab.py,
returns a random R8VEC with values in [A,B].
-
timestamp.py
prints the current YMDHMS date as a time stamp.
RNGLIB Source Code:
Examples and Tests:
You can go up one level to
the Python source codes.
Last revised on 05 August 2013.