Meta.Numerics library features include advanced functions,
solvers (root finders, integrators, optimizers),
statistics and data analysis,
linear algebra,
Fourier transforms, and extended precision arithmetic.
Advanced Functions
The library defines a large number of simple and advanced mathematical functions on
real numbers, Complex numbers, integers, and other specialized mathematical objects.
Advanced functions of real and complex numbers include:
Function |
Real |
Complex |
Notes |
Gamma |
✔ |
✔ |
also ln Γ, incomplete Gamma |
Psi (Digamma) |
✔ |
✔ |
also polygamma ψ(n) |
Beta |
✔ |
|
also incomplete Beta |
Error Function |
✔ |
✔ |
also erfc, erf-1, Faddeeva, Fresnel C and S |
Exponential Integrals |
✔ |
✔ |
includes Ein, Ei, En, and trigonometric integrals Ci and Si |
Bessel J and Y |
✔ |
|
also for non-integer orders, spherical Bessel j and y |
Modified Bessel I and K |
✔ |
|
also for non-integer orders, Airy Ai and Bi |
Coulomb Wave Functions F and G |
✔ |
|
accurate even in quantum tunneling region |
Reimann Zeta |
✔ |
✔ |
also Dirichlet η |
Dilogarithm Li2 (Spence's Function) |
✔ |
✔ |
also polylogarithm Lin |
Orthogonal polynomials |
✔ |
|
Chebyshev T,
Hermite H,
Legendre P,
Laguerre L,
Zernike R |
Elliptic Integrals |
✔ |
|
Legendre F, K, E; Carlson RF and RD, and RG |
Elliptic Functions |
✔ |
|
Jacobi cn, sn, and dn |
Hypergeometric function |
✔ |
|
2F1 |
Advanced functions of integers include:
Meta.Numerics also defines various specialized mathematical objects and associated functions:
Object |
Functions |
Complex numbers |
arithmetic, basic and advanced functions |
Vectors and matrices |
arithmetic, inversion, decompositions |
Spinors |
Clebsch-Gordon coefficients, 3j and 6j symbols |
Uncertain values |
arithmetic and basic functions with error propagation, confidence intervals |
Polynomials |
arithmetic, evaluation, composition, integration and differentiation |
Permutations |
generation, multiplication, inversion, cyclic decomposition and other properties |
Integer partitions |
generation |
Numerical Analysis (Solvers)
For arbitrary user-supplied functions, Meta.Numerics supports optimization (minimization and maximization), root-finding,
integration, and the solution of ordinary differential equations. All operations are supported on multi-dimensional functions
as well as functions of simple real numbers.
Functionality |
1-d |
n-d |
Notes |
optimization |
✔ |
✔ |
also global optimum search |
root-finding |
✔ |
✔ |
|
integration |
✔ |
✔ |
advanced multi-grid Monte-Carlo integrator |
ordinary differential equations |
✔ |
✔ |
also conservative integrator |
Statistics and Data Analysis
Data Wrangling
The library provides a framework similar to the data frame systems familiar to R and Pandas users.
Arrays of strongly typed data can be imported and exported from and to CSV and JSON formatted files.
Null data entries are supported via .NET's Nullable structure.
Data can be filtered, ordered, and transformed in many different ways. The new views produced copy
underlying data only when necessary, so manipulations of even large data sets are memory efficient.
Data can be passed in column-oriented form to our or any other statistical analysis APIs.
Statistical Analysis
The library provides specialized classes for working with various kinds of data, including:
Type |
Functionality |
Univariate Sample |
sample and population statistics,
transformations,
percentile/score conversions,
fits to distributions,
parametric and non-parametric tests
|
Bivariate Sample |
sample and population statistics,
regression (linear, polynomial, non-linear, logistic),
parametric and non-parametric tests of association
|
Multivariate Sample |
sample and population statistics,
regression (linear and logistic),
cluster and component analysis
|
Data with Error Bars |
fit to line, constant, proportionality, polynomial,
non-linear function, linear combination of functions
|
Contingency Table |
sample and population statistics,
parametric and non-parametric tests of association
|
Histograms |
sample and population statistics,
fits to distributions,
parametric tests
|
Time Series |
sample and population statistics,
power spectrum,
difference and integrate,
fit to AR and MA models
|
For each kind of data, methods allow you to evaluate descriptive statistics, fit models, and
perform appropriate statistical tests. All fits produce not just the best-fit parameter set, but
also error bars, a covariance matrix, and a goodness-of-fit test. Specialized methods make it
easy to add, remove, update, and locate data.
Statistical Tests
Some of the many statistical tests supported by the library include:
Parametric Test |
Nonparametric Alternative |
Purpose |
one-sample t-test |
sign test |
compare a sample's mean or median to a reference value |
two-sample t-test |
Mann-Whitney U-test |
compare the means or medians of two samples |
one-way and two-way ANOVA |
Kruskal-Wallis |
compare the means or medians of three or more samples |
Pearson's r |
Spearman's rho,
Kendall's tau |
detect association between two continuous variables |
Pearson's χ2 test |
Kendall's exact test |
detect associated between two categorical variables |
Shapiro-Francia |
Kolmogorov-Smirnov, Kuiper |
compare continuous sample data to a reference distribution |
Ljung-Box test |
|
detect autocorrelation in time series |
For all tests, we provide exact null distributions for small samples.
Distributions
Meta.Numerics defines a large number of probability distributions, both continuous:
and discrete:
For all defined distributions, you can obtain:
- Basic Descriptive Statistics: mean, median, variance, standard deviation, skewness, excess kurtosis
- Probability Mass and Probability Density Function (PDF) values
- Cumulative Distribution Function (CDF) values, integrated from the left or right
- Inverse CDF values, i.e. percentile to score conversions
- Arbitrary raw moments, central moments, and cumulants
- Random deviates
You can also fit sample data to many of the distributions and perform maximum likelihood fits to any
user-supplied distribution.
Matrix Algebra
The library defines a number of matrix classes: rectangular, square, symmetric, and tri-diagonal. Each class defines operations appropriate to that
matrix type, implemented to exploit the matrix structure for optimum performance. The following table summarizes the available operations:
Operation |
Rectangular |
Square |
Symmetric |
Tri-diagonal |
Arithmetic |
✔ |
✔ |
✔ |
✔ |
Decomposition |
✔ |
✔ |
✔ |
✔ |
Determinant |
|
✔ |
✔ |
✔ |
Inverse |
|
✔ |
✔ |
✔ |
Eigenvalues and Eigenvectors |
|
✔ |
✔ |
✔ |
Available decompositions include LU, QR, and singular value decompositions (SVD).
Extended Precision
We supply a quad precision floating point type that tracks approximately 60 decimal digits.
We supply Int128 and UInt128 types for 128-bit integer arithmetic that is faster than .NET's native BigInteger type.
|