1
$\begingroup$

I would like to apply the sigmoid (logistic) function:

$\sigma{(x)} = \frac{1}{1+e^{-x}}$

to a vector $\mathbb{R}^n$ or matrix $\mathbb{R}^{m × n}$.

And the question is how to write this function for vectors/matrices. I need it for a scientific publication.

$\endgroup$
  • $\begingroup$ Oftentimes people simply write $\sigma(\mathbf{x})$ to denote elementwise application of $\sigma$ to the vector or matrix (so if $\mathbf{x} = \begin{bmatrix} x\\ y\\ z\end{bmatrix}$, then $\sigma(\mathbf{x})=\sigma\left(\begin{bmatrix} x\\ y\\ z\end{bmatrix}\right) = \begin{bmatrix}\sigma(x)\\ \sigma(y) \\ \sigma(z)\end{bmatrix}$ for example). If in doubt, maybe you could just quickly explain the notation you are using. $\endgroup$ – Minus One-Twelfth Mar 1 at 10:54
  • 1
    $\begingroup$ Please answer the question, I will accept your answer. $\endgroup$ – Paddy Mar 1 at 10:59
1
$\begingroup$

Oftentimes, people simply write $\sigma(\mathbf{x})$ to denote elementwise application of the sigmoid function to a vector or matrix. (For example, the author does it here, search the page for "vectorizing".) If in doubt, maybe you could just quickly explain the notation you are using.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.