|
||||
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::TActivationIdentity * 0008 * * 0009 * * 0010 * Description: * 0011 * Identity 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_TActivationIdentity 0025 #define ROOT_TMVA_TActivationIdentity 0026 0027 ////////////////////////////////////////////////////////////////////////// 0028 // // 0029 // TActivationIdentity // 0030 // // 0031 // Identity activation function for TNeuron // 0032 // // 0033 ////////////////////////////////////////////////////////////////////////// 0034 0035 #include "TString.h" 0036 0037 #include "TMVA/TActivation.h" 0038 0039 namespace TMVA { 0040 0041 class TActivationIdentity : public TActivation { 0042 0043 public: 0044 0045 TActivationIdentity() {} 0046 ~TActivationIdentity() {} 0047 0048 // evaluate the activation function 0049 virtual Double_t Eval(Double_t arg) { return arg; } // f(x) = x 0050 0051 // evaluate the derivative of the activation function 0052 virtual Double_t EvalDerivative(Double_t) { 0053 return 1; // f'(x) = 1 0054 } 0055 0056 // minimum of the range of the activation function 0057 virtual Double_t GetMin() { return 0; } // these should never be called 0058 0059 // maximum of the range of the activation function 0060 virtual Double_t GetMax() { return 1; } // these should never be called 0061 0062 // expression for activation function 0063 virtual TString GetExpression() { return "x\t1"; } 0064 0065 // writer of function code 0066 virtual void MakeFunction(std::ostream& fout, const TString& fncName); 0067 0068 private: 0069 0070 ClassDef(TActivationIdentity,0); // Identity activation function for TNeuron 0071 }; 0072 0073 } // namespace TMVA 0074 0075 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |