Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ inv_logit()

double stan::math::opencl_kernels::inv_logit ( double  x)

Returns the inverse logit function applied to the kernel generator expression.

The inverse logit function is defined by

\(\mbox{logit}^{-1}(x) = \frac{1}{1 + \exp(-x)}\).

This function can be used to implement the inverse link function for logistic regression.

The inverse to this function is logit.

\[ \mbox{inv\_logit}(y) = \begin{cases} \mbox{logit}^{-1}(y) & \mbox{if } -\infty\leq y \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } y = \textrm{NaN} \end{cases} \]

\[ \frac{\partial\, \mbox{inv\_logit}(y)}{\partial y} = \begin{cases} \frac{\partial\, \mbox{logit}^{-1}(y)}{\partial y} & \mbox{if } -\infty\leq y\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } y = \textrm{NaN} \end{cases} \]

\[ \mbox{logit}^{-1}(y) = \frac{1}{1 + \exp(-y)} \]

\[ \frac{\partial \, \mbox{logit}^{-1}(y)}{\partial y} = \frac{\exp(y)}{(\exp(y)+1)^2} \]

Parameters
[in]xArgument.
Returns
natural logarithm of one minus the exponential of the argument.

Definition at line 57 of file inv_logit.hpp.