TActivationChooser.h

Go to the documentation of this file.
00001 // @(#)root/tmva $Id: TActivationChooser.h 29195 2009-06-24 10:39:49Z brun $
00002 // Author: Matt Jachowski 
00003 
00004 /**********************************************************************************
00005  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis       *
00006  * Package: TMVA                                                                  *
00007  * Class  : TMVA::TActivationChooser                                              *
00008  * Web    : http://tmva.sourceforge.net                                           *
00009  *                                                                                *
00010  * Description:                                                                   *
00011  *      Class for easily choosing activation functions.                           *
00012  *                                                                                *
00013  * Authors (alphabetical):                                                        *
00014  *      Matt Jachowski  <jachowski@stanford.edu> - Stanford University, USA       *
00015  *                                                                                *
00016  * Copyright (c) 2005:                                                            *
00017  *      CERN, Switzerland                                                         *
00018  *                                                                                *
00019  * Redistribution and use in source and binary forms, with or without             *
00020  * modification, are permitted according to the terms listed in LICENSE           *
00021  * (http://tmva.sourceforge.net/LICENSE)                                          *
00022  **********************************************************************************/
00023  
00024 
00025 #ifndef ROOT_TMVA_TActivationChooser
00026 #define ROOT_TMVA_TActivationChooser
00027 
00028 //////////////////////////////////////////////////////////////////////////
00029 //                                                                      //
00030 // TActivationChooser                                                   //
00031 //                                                                      //
00032 // Class for easily choosing activation functions                       //
00033 //                                                                      //
00034 //////////////////////////////////////////////////////////////////////////
00035 
00036 #include <vector>
00037 #ifndef ROOT_TString
00038 #include "TString.h"
00039 #endif
00040 
00041 namespace TMVA {
00042 
00043    class TActivation;
00044    class MsgLogger;
00045    
00046    class TActivationChooser {
00047    public:
00048 
00049       enum EActivationType { kLinear = 0,
00050                              kSigmoid,
00051                              kTanh,
00052                              kRadial
00053       };
00054 
00055       TActivationChooser();
00056       virtual ~TActivationChooser();
00057 
00058       TActivation* CreateActivation(EActivationType type) const;
00059       TActivation* CreateActivation(const TString& type) const;
00060       std::vector<TString>* GetAllActivationNames() const;
00061 
00062    private:
00063 
00064       TString fLINEAR;  // activation function name
00065       TString fSIGMOID; // activation function name
00066       TString fTANH;    // activation function name
00067       TString fRADIAL;  // activation function name
00068 
00069       mutable MsgLogger* fLogger;                     //! message logger
00070       MsgLogger& Log() const { return *fLogger; }                       
00071 
00072       ClassDef(TActivationChooser,0) // Class for choosing activation functions
00073    };
00074 
00075 } // namespace TMVA
00076 
00077 #endif

Generated on Tue Jul 5 14:27:39 2011 for ROOT_528-00b_version by  doxygen 1.5.1