Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:10

0001 // @(#)root/tmva $Id$
0002 // Author: Matt Jachowski
0003 
0004 /**********************************************************************************
0005  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis       *
0006  * Package: TMVA                                                                  *
0007  * Class  : TMVA::TActivationSigmoid                                              *
0008  *                                             *
0009  *                                                                                *
0010  * Description:                                                                   *
0011  *      Sigmoid activation function for TNeuron                                   *
0012  *                                                                                *
0013  * Authors (alphabetical):                                                        *
0014  *      Matt Jachowski  <jachowski@stanford.edu> - Stanford University, USA       *
0015  *                                                                                *
0016  * Copyright (c) 2005:                                                            *
0017  *      CERN, Switzerland                                                         *
0018  *                                                                                *
0019  * Redistribution and use in source and binary forms, with or without             *
0020  * modification, are permitted according to the terms listed in LICENSE           *
0021  * (see tmva/doc/LICENSE)                                          *
0022  **********************************************************************************/
0023 
0024 #ifndef ROOT_TMVA_TActivationSigmoid
0025 #define ROOT_TMVA_TActivationSigmoid
0026 
0027 //////////////////////////////////////////////////////////////////////////
0028 //                                                                      //
0029 // TActivationSigmoid                                                   //
0030 //                                                                      //
0031 // Sigmoid activation function for TNeuron                              //
0032 //                                                                      //
0033 //////////////////////////////////////////////////////////////////////////
0034 
0035 #include "TString.h"
0036 
0037 #include "TMVA/TActivation.h"
0038 
0039 namespace TMVA {
0040 
0041    class TActivationSigmoid : public TActivation {
0042 
0043    public:
0044       TActivationSigmoid() {}
0045       ~TActivationSigmoid() {}
0046 
0047       // evaluate the activation function
0048       Double_t Eval(Double_t arg);
0049 
0050       // evaluate the derivative of the activation function
0051       Double_t EvalDerivative(Double_t arg);
0052 
0053       // minimum of the range of the activation function
0054       Double_t GetMin() { return 0; }
0055 
0056       // maximum of the range of the activation function
0057       Double_t GetMax() { return 1; }
0058 
0059       // expression for the activation function
0060       TString GetExpression();
0061 
0062       // writer of function code
0063       virtual void MakeFunction(std::ostream& fout, const TString& fncName);
0064 
0065    private:
0066 
0067       ClassDef(TActivationSigmoid,0); // Sigmoid activation function for TNeuron
0068    };
0069 
0070 } // namespace TMVA
0071 
0072 #endif