ElishFunction Class Reference

The ELiSH function, defined by. More...

Static Public Member Functions

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...

 
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...

 

Detailed Description

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*}

Definition at line 48 of file elish_function.hpp.

Member Function Documentation

◆ Deriv() [1/2]

static double Deriv ( const double  y)
inlinestatic

Computes the first derivatives of ELiSH function.

Parameters
yInput data.
Returns
f'(x).

Definition at line 84 of file elish_function.hpp.

◆ Deriv() [2/2]

static void Deriv ( const InputVecType &  y,
OutputVecType &  x 
)
inlinestatic

Computes the first derivatives of the ELiSH function.

Parameters
yInput data.
xThe resulting derivatives.

Definition at line 103 of file elish_function.hpp.

◆ Fn() [1/2]

static double Fn ( const double  x)
inlinestatic

Computes the ELiSH function.

Parameters
xInput data.
Returns
f(x).

Definition at line 57 of file elish_function.hpp.

◆ Fn() [2/2]

static void Fn ( const InputVecType &  x,
OutputVecType &  y 
)
inlinestatic

Computes the ELiSH function.

Parameters
xInput data.
yThe resulting output activations.

Definition at line 72 of file elish_function.hpp.


The documentation for this class was generated from the following file:
  • /home/jenkins-mlpack/mlpack.org/_src/mlpack-git/src/mlpack/methods/ann/activation_functions/elish_function.hpp