63   TString expr = 
"1.0/(1.0+TMath::Exp(-x))\t\tTMath::Exp(-x)/(1.0+TMath::Exp(-x))^2";
 
   72   fout << 
"double " << fncName << 
"(double x) const {" << std::endl;
 
   73   fout << 
"   // sigmoid" << std::endl;
 
   74   fout << 
"   return 1.0/(1.0+exp(-x));" << std::endl;
 
   75   fout << 
"}" << std::endl;
 
Sigmoid activation function for TNeuron.
 
TString GetExpression()
get expressions for the sigmoid and its derivatives
 
Double_t Eval(Double_t arg)
evaluate the sigmoid
 
Double_t EvalDerivative(Double_t arg)
evaluate the derivative of the sigmoid
 
virtual void MakeFunction(std::ostream &fout, const TString &fncName)
writes the sigmoid activation function source code
 
Double_t Exp(Double_t x)
Returns the base-e exponential function of x, which is e raised to the power x.