12 #ifndef MLPACK_METHODS_ANN_ACTIVATION_FUNCTIONS_POISSON1_FUNCTION_HPP 13 #define MLPACK_METHODS_ANN_ACTIVATION_FUNCTIONS_POISSON1_FUNCTION_HPP 37 static double Fn(
const double x)
39 return (x - 1) * std::exp(-x);
48 template<
typename InputVecType,
typename OutputVecType>
49 static void Fn(
const InputVecType& x, OutputVecType& y)
51 y = (x - 1) % arma::exp(-x);
60 static double Deriv(
const double y)
62 return std::exp(-y) + (1 - y) * std::exp(-y);
71 template<
typename InputVecType,
typename OutputVecType>
72 static void Deriv(
const InputVecType& x, OutputVecType& y)
74 y = arma::exp(-x) + (1 - x) % arma::exp(-x);
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
The Poisson one function, defined by.
Definition: poisson1_function.hpp:28
The core includes that mlpack expects; standard C++ includes and Armadillo.
static double Deriv(const double y)
Computes the first derivative of the Poisson one function.
Definition: poisson1_function.hpp:60
static double Fn(const double x)
Computes the Poisson one function.
Definition: poisson1_function.hpp:37
static void Deriv(const InputVecType &x, OutputVecType &y)
Computes the first derivatives of the Poisson one function.
Definition: poisson1_function.hpp:72
static void Fn(const InputVecType &x, OutputVecType &y)
Computes the Poisson one function.
Definition: poisson1_function.hpp:49