37 #ifndef ROOT_TMVA_TActivationRadial
48 TMVA::TActivationRadial::TActivationRadial()
50 fEqn =
new TFormula(
"Gaussian",
"TMath::Exp(-x^2/2.0)");
51 fEqnDerivative =
new TFormula(
"derivative",
"-x*TMath::Exp(-x^2/2.0)");
69 return fEqn->Eval(arg);
78 return fEqnDerivative->Eval(arg);
88 if (fEqn ==
NULL) expr +=
"<null>";
89 else expr += fEqn->GetExpFormula();
93 if (fEqnDerivative ==
NULL) expr +=
"<null>";
94 else expr += fEqnDerivative->GetExpFormula();
104 fout <<
"double " << fncName <<
"(double x) const {" << std::endl;
105 fout <<
" // radial" << std::endl;
106 fout <<
" return exp(-x*x/2.0);" << std::endl;
107 fout <<
"}" << std::endl;
ClassImp(TMVA::TActivationRadial) TMVA
constructor for gaussian with center 0, width 1
Double_t Eval(Double_t arg)
evaluate gaussian
virtual void MakeFunction(std::ostream &fout, const TString &fncName)
writes the sigmoid activation function source code
~TActivationRadial()
destructor
TString GetExpression()
get expressions for the gaussian and its derivatives
TFormula * fEqnDerivative
Double_t EvalDerivative(Double_t arg)
evaluate derivative
static const Int_t UNINITIALIZED