mlpack
Static Public Member Functions | List of all members
mlpack::ann::ElishFunction Class Reference

The ELiSH function, defined by. More...

#include <elish_function.hpp>

Static Public Member Functions

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

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

Member Function Documentation

◆ Deriv() [1/2]

static double mlpack::ann::ElishFunction::Deriv ( const double  y)
inlinestatic

Computes the first derivatives of ELiSH function.

Parameters
yInput data.
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
yInput data.
xThe resulting derivatives.

◆ Fn() [1/2]

static double mlpack::ann::ElishFunction::Fn ( const double  x)
inlinestatic

Computes the ELiSH function.

Parameters
xInput data.
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
xInput data.
yThe resulting output activations.

The documentation for this class was generated from the following file: