00001 // @(#)root/tmva $Id: TActivation.h 29122 2009-06-22 06:51:30Z brun $ 00002 // Author: Matt Jachowski 00003 00004 /********************************************************************************** 00005 * Project: TMVA - a Root-integrated toolkit for multivariate data analysis * 00006 * Package: TMVA * 00007 * Class : TMVA::TActivation * 00008 * * 00009 * Description: * 00010 * Interface for TNeuron activation function classes. * 00011 * * 00012 * Authors (alphabetical): * 00013 * Matt Jachowski <jachowski@stanford.edu> - Stanford University, USA * 00014 * * 00015 * Copyright (c) 2005: * 00016 * CERN, Switzerland * 00017 * * 00018 * Redistribution and use in source and binary forms, with or without * 00019 * modification, are permitted according to the terms listed in LICENSE * 00020 * (http://tmva.sourceforge.net/LICENSE) * 00021 **********************************************************************************/ 00022 00023 00024 #ifndef ROOT_TMVA_TActivation 00025 #define ROOT_TMVA_TActivation 00026 00027 ////////////////////////////////////////////////////////////////////////// 00028 // // 00029 // TActivation // 00030 // // 00031 // Interface for TNeuron activation function classes // 00032 // // 00033 ////////////////////////////////////////////////////////////////////////// 00034 00035 #include <iosfwd> 00036 00037 #ifndef ROOT_TObject 00038 #include "TObject.h" 00039 #endif 00040 #ifndef ROOT_TString 00041 #include "TString.h" 00042 #endif 00043 00044 namespace TMVA { 00045 00046 class TActivation { 00047 00048 public: 00049 00050 TActivation() {} 00051 virtual ~TActivation() {} 00052 00053 // evaluate the activation function 00054 virtual Double_t Eval(Double_t arg) = 0; 00055 00056 // evaulate the derivative of the activation function 00057 virtual Double_t EvalDerivative(Double_t arg) = 0; 00058 00059 // minimum of the range of activation function 00060 virtual Double_t GetMin() = 0; 00061 00062 // maximum of the range of the activation function 00063 virtual Double_t GetMax() = 0; 00064 00065 // expression for activation function 00066 virtual TString GetExpression() = 0; 00067 00068 // writer of function code 00069 virtual void MakeFunction(std::ostream& fout, const TString& fncName) = 0; 00070 00071 ClassDef(TActivation,0) // Interface for TNeuron activation function classes 00072 00073 }; 00074 00075 } // namespace TMVA 00076 00077 #endif