Numerix v0.4.2 Numerix.Special

Special mathematical functions that would make Euler proud.

Summary

Functions

Calculates the sigmoidal logistic function, a common “S” shape. It is the inverse of the natural logit function and so can be used to convert the logarithm of odds into a probability

Calculates the logit function (the inverse of the sigmoidal logistic function) for probability p (a number between 0 and 1)

Functions

logistic(p)
logistic(Numerix.Common.extended_number) :: float

Calculates the sigmoidal logistic function, a common “S” shape. It is the inverse of the natural logit function and so can be used to convert the logarithm of odds into a probability.

logit(p)
logit(float) :: Numerix.Common.extended_number | nil

Calculates the logit function (the inverse of the sigmoidal logistic function) for probability p (a number between 0 and 1).