Module compute::functions[][src]

Various mathematical and statistical functions.

Functions

beta

Calculates the beta function using the relationship between the beta function and the gamma function.

binom_coeff

Calculates the binomial coefficient nCk for two integers n and k, with n >= k.

binom_coeff_alt

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.

boxcox

Calculates the one-parameter Box-Cox transformation with some power parameter lambda.

boxcox_shifted

Calculates the two-parameter Box-Cox transformation with some power parameter lambda and some shift parameter alpha.

digamma

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.

gamma

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.

logistic

Calculates the standard logistic function

logit

Calculates the logit function

softmax

Calculates the softmax (the normalized exponential) function, which is a generalization of the logistic function to multiple dimensions.