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

The logistic function, defined by. More...

#include <logistic_function.hpp>

Static Public Member Functions

template<typename eT >
static double Fn (const eT x)
 Computes the logistic function. More...
 
template<typename InputVecType , typename OutputVecType >
static void Fn (const InputVecType &x, OutputVecType &y)
 Computes the logistic function. More...
 
static double Deriv (const double x)
 Computes the first derivative of the logistic function. More...
 
template<typename InputVecType , typename OutputVecType >
static void Deriv (const InputVecType &y, OutputVecType &x)
 Computes the first derivatives of the logistic function. More...
 
static double Inv (const double y)
 Computes the inverse of the logistic function. More...
 
template<typename InputVecType , typename OutputVecType >
static void Inv (const InputVecType &y, OutputVecType &x)
 Computes the inverse of the logistic function. More...
 

Detailed Description

The logistic function, defined by.

\begin{eqnarray*} f(x) &=& \frac{1}{1 + e^{-x}} \\ f'(x) &=& f(x) * (1 - f(x)) \\ f^{-1}(y) &=& ln(\frac{y}{1-y}) \end{eqnarray*}

Member Function Documentation

◆ Deriv() [1/2]

static double mlpack::ann::LogisticFunction::Deriv ( const double  x)
inlinestatic

Computes the first derivative of the logistic function.

Parameters
xInput activation.
Returns
f'(x)

◆ Deriv() [2/2]

template<typename InputVecType , typename OutputVecType >
static void mlpack::ann::LogisticFunction::Deriv ( const InputVecType &  y,
OutputVecType &  x 
)
inlinestatic

Computes the first derivatives of the logistic function.

Parameters
yInput activations.
xThe resulting derivatives.

◆ Fn() [1/2]

template<typename eT >
static double mlpack::ann::LogisticFunction::Fn ( const eT  x)
inlinestatic

Computes the logistic function.

Parameters
xInput data.
Returns
f(x).

◆ Fn() [2/2]

template<typename InputVecType , typename OutputVecType >
static void mlpack::ann::LogisticFunction::Fn ( const InputVecType &  x,
OutputVecType &  y 
)
inlinestatic

Computes the logistic function.

Parameters
xInput data.
yThe resulting output activation.

◆ Inv() [1/2]

static double mlpack::ann::LogisticFunction::Inv ( const double  y)
inlinestatic

Computes the inverse of the logistic function.

Parameters
yInput data.
Returns
f^{-1}(y)

◆ Inv() [2/2]

template<typename InputVecType , typename OutputVecType >
static void mlpack::ann::LogisticFunction::Inv ( const InputVecType &  y,
OutputVecType &  x 
)
inlinestatic

Computes the inverse of the logistic function.

Parameters
yInput data.
xThe resulting inverse of the input data.

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