00001 // @(#)root/tmva $Id: CrossEntropy.h 37986 2011-02-04 21:42:15Z pcanal $ 00002 // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss 00003 00004 /********************************************************************************** 00005 * Project: TMVA - a Root-integrated toolkit for multivariate data analysis * 00006 * Package: TMVA * 00007 * Class : CrossEntropy * 00008 * Web : http://tmva.sourceforge.net * 00009 * * 00010 * Description: Implementation of the CrossEntropy as separation criterion * 00011 * * 00012 * Authors (alphabetical): * 00013 * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * 00014 * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, Germany * 00015 * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada * 00016 * * 00017 * Copyright (c) 2005: * 00018 * CERN, Switzerland * 00019 * U. of Victoria, Canada * 00020 * Heidelberg U., Germany * 00021 * * 00022 * Redistribution and use in source and binary forms, with or without * 00023 * modification, are permitted according to the terms listed in LICENSE * 00024 * (http://tmva.sourceforge.net/LICENSE) * 00025 **********************************************************************************/ 00026 00027 #ifndef ROOT_TMVA_CrossEntropy 00028 #define ROOT_TMVA_CrossEntropy 00029 00030 ////////////////////////////////////////////////////////////////////////// 00031 // // 00032 // CrossEntropy // 00033 // // 00034 // Implementation of the CrossEntropy as separation criterion // 00035 // -p log (p) - (1-p)log(1-p); p=purity = s/(s+b) // 00036 // // 00037 ////////////////////////////////////////////////////////////////////////// 00038 00039 #ifndef ROOT_TMVA_SeparationBase 00040 #include "TMVA/SeparationBase.h" 00041 #endif 00042 00043 namespace TMVA { 00044 00045 class CrossEntropy : public SeparationBase { 00046 00047 public: 00048 00049 // default constructor 00050 CrossEntropy(): SeparationBase() { fName = "CE"; } 00051 00052 // copy constructor 00053 CrossEntropy( const CrossEntropy& g): SeparationBase(g) {} 00054 00055 // destructor 00056 virtual ~CrossEntropy(){} 00057 00058 // return the separation Index -p log (p) - (1-p)log(1-p); p=purity = s/(s+b) 00059 virtual Double_t GetSeparationIndex( const Double_t &s, const Double_t &b ); 00060 00061 protected: 00062 00063 ClassDef(CrossEntropy,0) // Implementation of the CrossEntropy as separation criterion 00064 }; 00065 00066 } // namespace TMVA 00067 00068 #endif 00069