The ELiSH function, defined by.
More...
#include <elish_function.hpp>
|
static double | Fn (const double x) |
| Computes the ELiSH function. More...
|
|
template<typename InputVecType , typename OutputVecType > |
static void | Fn (const InputVecType &x, OutputVecType &y) |
| Computes the ELiSH function. More...
|
|
static double | Deriv (const double y) |
| Computes the first derivatives of ELiSH function. More...
|
|
template<typename InputVecType , typename OutputVecType > |
static void | Deriv (const InputVecType &y, OutputVecType &x) |
| Computes the first derivatives of the ELiSH function. More...
|
|
The ELiSH function, defined by.
\begin{eqnarray*} f(x) &=& \begin{cases} x / (1 + e^{-x}) & x \geq 0\\ (e^{x} - 1) / (1 + e^{-x}) & x < 0.\\ \end{cases} \\ f'(x) &=& \begin{cases} 1 / (1 + e^{-y}) + y * e^{-y} / (1 + e^{-y})^2 & x \geq 0\\ e^y - 2 / (1 + e^y) + 2 / (1 + e^y)^2 & x < 0.\\ \end{cases} \end{eqnarray*}
◆ Deriv() [1/2]
static double mlpack::ann::ElishFunction::Deriv |
( |
const double |
y | ) |
|
|
inlinestatic |
Computes the first derivatives of ELiSH function.
- Parameters
-
- Returns
- f'(x).
◆ Deriv() [2/2]
template<typename InputVecType , typename OutputVecType >
static void mlpack::ann::ElishFunction::Deriv |
( |
const InputVecType & |
y, |
|
|
OutputVecType & |
x |
|
) |
| |
|
inlinestatic |
Computes the first derivatives of the ELiSH function.
- Parameters
-
y | Input data. |
x | The resulting derivatives. |
◆ Fn() [1/2]
static double mlpack::ann::ElishFunction::Fn |
( |
const double |
x | ) |
|
|
inlinestatic |
Computes the ELiSH function.
- Parameters
-
- Returns
- f(x).
◆ Fn() [2/2]
template<typename InputVecType , typename OutputVecType >
static void mlpack::ann::ElishFunction::Fn |
( |
const InputVecType & |
x, |
|
|
OutputVecType & |
y |
|
) |
| |
|
inlinestatic |
Computes the ELiSH function.
- Parameters
-
x | Input data. |
y | The resulting output activations. |
The documentation for this class was generated from the following file: