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);
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
The core includes that mlpack expects; standard C++ includes and Armadillo.
static void Deriv(const InputVecType &y, OutputVecType &x)
Computes the first derivatives of the Elliot function.
Definition: elliot_function.hpp:84
static double Fn(const double x)
Computes the Elliot function.
Definition: elliot_function.hpp:49
The Elliot function, defined by.
Definition: elliot_function.hpp:40
static double Deriv(const double y)
Computes the first derivative of the Elliot function.
Definition: elliot_function.hpp:72
static void Fn(const InputVecType &x, OutputVecType &y)
Computes the Elliot function.
Definition: elliot_function.hpp:61