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