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