Statistics for Swift — v0.1.4
A custom implementation of GitHub site with the purpose of streamlining access to built-in functions and classes. This is starting out as a personal project to facilitate the authors needs and intersts.
factorial
choose
(nCk)median
mean
variance
standardDeviation
erfinv
(erf
part ofFoundation
)lsr
, least squares regression
- Bernoulli
- Poisson
- Geometric
- Binomial
- CustomDiscrete (new)
- Normal
- Log-normal
- Laplace
- Weibull (new)
- Exponential
- CustomRanked (new, needs pdf implementation)
And each distribution has these methods:
- pmf or pdf
- cdf
- quantile
- random (takes an optional int and returns an array of that length, or otherwise a single value)
Run swift test
from the base directory in a terminal window.
If you would like to contribute, please submit a pull request, or raise an issue.
All code that I created in this repository (which is everything that was not generated by Xcode from a template, including the main source and the Unit Tests) is licensed under CC0, which means that it is part of the public domain and you can do anything with it, without asking permission.