Module compute::functions [−][src]
Expand description
Various mathematical and statistical functions.
Functions
Calculates the beta function using the relationship between the beta function and the gamma function.
Calculates the binomial coefficient
nCk for two integers n
and k
, with n >= k
.
An alternative method for computing binomial coefficients. There is no significant difference
between the compute time using the binom_coeff
method and this method. This method becomes
slightly inaccurate (by 1 or 2) starting at n ~ 50
.
Calculates the one-parameter Box-Cox transformation with some power parameter lambda
.
Calculates the two-parameter Box-Cox transformation with some power parameter lambda
and some
shift parameter alpha
.
Calculates the digamma function, which is the
logarithmic derivative of the gamma function. It obeys the equation digamma(x+1) = digamma(x) + 1/x
. The approximation works better for large values. If the value is small, this function
will shift it up using the digamma recurrence relation.
Calculates the error function erf(x).
Calculates the Gamma function using the Lanczos
approximation. It obeys the equation
gamma(x+1) = gamma(x) * x
. This approximation uses the reflection formula to extend the
calculation to the entire complex plane.
Calculates the standard logistic function
Calculates the logit function
Calculates the softmax (the normalized exponential) function, which is a generalization of the logistic function to multiple dimensions.