00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #include "TMVA/ClassifierFactory.h"
00034 #include "TMVA/MethodBayesClassifier.h"
00035 #include "TMVA/Tools.h"
00036 #include "Riostream.h"
00037
00038 REGISTER_METHOD(BayesClassifier)
00039
00040 ClassImp(TMVA::MethodBayesClassifier)
00041
00042
00043 TMVA::MethodBayesClassifier::MethodBayesClassifier( const TString& jobName,
00044 const TString& methodTitle,
00045 DataSetInfo& theData,
00046 const TString& theOption,
00047 TDirectory* theTargetDir ) :
00048 TMVA::MethodBase( jobName, Types::kBayesClassifier, methodTitle, theData, theOption, theTargetDir )
00049 {
00050
00051 }
00052
00053
00054 TMVA::MethodBayesClassifier::MethodBayesClassifier( DataSetInfo& theData,
00055 const TString& theWeightFile,
00056 TDirectory* theTargetDir ) :
00057 TMVA::MethodBase( Types::kBayesClassifier, theData, theWeightFile, theTargetDir )
00058 {
00059
00060 }
00061
00062
00063 Bool_t TMVA::MethodBayesClassifier::HasAnalysisType( Types::EAnalysisType type, UInt_t numberClasses, UInt_t )
00064 {
00065
00066 if( type == Types::kClassification && numberClasses == 2 ) return kTRUE;
00067 return kFALSE;
00068 }
00069
00070
00071
00072 void TMVA::MethodBayesClassifier::Init( void )
00073 {
00074
00075 }
00076
00077
00078 void TMVA::MethodBayesClassifier::DeclareOptions()
00079 {
00080
00081 }
00082
00083
00084 void TMVA::MethodBayesClassifier::ProcessOptions()
00085 {
00086
00087 }
00088
00089
00090 TMVA::MethodBayesClassifier::~MethodBayesClassifier( void )
00091 {
00092
00093 }
00094
00095
00096 void TMVA::MethodBayesClassifier::Train( void )
00097 {
00098
00099 }
00100
00101
00102 void TMVA::MethodBayesClassifier::AddWeightsXMLTo( void* ) const {
00103 Log() << kFATAL << "Please implement writing of weights as XML" << Endl;
00104 }
00105
00106
00107 void TMVA::MethodBayesClassifier::ReadWeightsFromStream( istream & )
00108 {
00109
00110 }
00111
00112
00113 Double_t TMVA::MethodBayesClassifier::GetMvaValue( Double_t* err, Double_t* errUpper )
00114 {
00115
00116 Double_t myMVA = 0;
00117
00118
00119 NoErrorCalc(err, errUpper);
00120
00121 return myMVA;
00122 }
00123
00124
00125 void TMVA::MethodBayesClassifier::MakeClassSpecific( std::ostream& fout, const TString& className ) const
00126 {
00127
00128 fout << " // not implemented for class: \"" << className << "\"" << endl;
00129 fout << "};" << endl;
00130 }
00131
00132
00133 void TMVA::MethodBayesClassifier::GetHelpMessage() const
00134 {
00135
00136
00137
00138
00139 Log() << Endl;
00140 Log() << gTools().Color("bold") << "--- Short description:" << gTools().Color("reset") << Endl;
00141 Log() << Endl;
00142 Log() << "<None>" << Endl;
00143 Log() << Endl;
00144 Log() << gTools().Color("bold") << "--- Performance optimisation:" << gTools().Color("reset") << Endl;
00145 Log() << Endl;
00146 Log() << "<None>" << Endl;
00147 Log() << Endl;
00148 Log() << gTools().Color("bold") << "--- Performance tuning via configuration options:" << gTools().Color("reset") << Endl;
00149 Log() << Endl;
00150 Log() << "<None>" << Endl;
00151 }