24 #ifndef MLPACK_METHODS_ANN_ACTIVATION_FUNCTIONS_ELLIOT_FUNCTION_HPP 25 #define MLPACK_METHODS_ANN_ACTIVATION_FUNCTIONS_ELLIOT_FUNCTION_HPP 49 static double Fn(
const double x)
51 return x / (1.0 + std::abs(x));
60 template <
typename InputVecType,
typename OutputVecType>
61 static void Fn(
const InputVecType &x, OutputVecType &y)
63 y = x / (1.0 + arma::abs(x));
72 static double Deriv(
const double y)
74 return 1.0 / std::pow(1.0 + std::abs(y), 2);
83 template <
typename InputVecType,
typename OutputVecType>
84 static void Deriv(
const InputVecType &y, OutputVecType &x)
86 x = 1.0 / arma::pow(1.0 + arma::abs(y), 2);
static void Fn(const InputVecType &x, OutputVecType &y)
Computes the Elliot function.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
static double Deriv(const double y)
Computes the first derivative of the Elliot function.
The Elliot function, defined by.
static double Fn(const double x)
Computes the Elliot function.
static void Deriv(const InputVecType &y, OutputVecType &x)
Computes the first derivatives of the Elliot function.