32 #ifndef ROOT_TMVA_MethodBoost
33 #define ROOT_TMVA_MethodBoost
55 namespace Experimental {
58 class MethodBoost :
public MethodCompositeBase {
61 friend class Experimental::Classification;
66 MethodBoost(
const TString& jobName,
67 const TString& methodTitle,
69 const TString& theOption =
"" );
71 MethodBoost( DataSetInfo& dsi,
72 const TString& theWeightFile );
74 virtual ~MethodBoost(
void );
76 virtual Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t numberClasses, UInt_t );
82 const Ranking* CreateRanking();
85 Bool_t BookMethod( Types::EMVA theMethod, TString methodTitle, TString theOption );
86 void SetBoostedMethodName ( TString methodName ) { fBoostedMethodName = methodName; }
88 Int_t GetBoostNum() {
return fBoostNum; }
90 void CleanBoostOptions();
92 Double_t GetMvaValue( Double_t* err=0, Double_t* errUpper = 0 );
99 void PrintResults(
const TString&, std::vector<Double_t>&,
const Double_t )
const;
106 void MonitorBoost( Types::EBoostStage stage, UInt_t methodIdx=0);
109 void DeclareOptions();
110 void DeclareCompatibilityOptions();
111 void ProcessOptions();
114 MethodBase* CurrentMethod(){
return fCurrentMethod;}
115 UInt_t CurrentMethodIdx(){
return fCurrentMethodIdx;}
120 Double_t SingleBoost(MethodBase* method);
121 Double_t AdaBoost(MethodBase* method, Bool_t useYesNoLeaf );
126 Double_t CalcMethodWeight();
129 Double_t GetBoostROCIntegral(Bool_t, Types::ETreeType, Bool_t CalcOverlapIntergral=kFALSE);
132 void WriteMonitoringHistosToFile(
void )
const;
135 virtual void WriteEvaluationHistosToFile(Types::ETreeType treetype);
138 virtual void TestClassification();
141 void FindMVACut(MethodBase* method);
144 void ResetBoostWeights();
147 void CreateMVAHistorgrams();
151 void CalcMVAValues();
156 TString fTransformString;
157 Bool_t fDetailedMonitoring;
159 Double_t fAdaBoostBeta;
161 Double_t fBaggedSampleFraction;
163 TString fBoostedMethodName;
164 TString fBoostedMethodTitle;
165 TString fBoostedMethodOptions;
167 Bool_t fMonitorBoostedMethod;
170 std::vector< TH1* > fTrainSigMVAHist;
171 std::vector< TH1* > fTrainBgdMVAHist;
173 std::vector< TH1* > fBTrainSigMVAHist;
174 std::vector< TH1* > fBTrainBgdMVAHist;
176 std::vector< TH1* > fTestSigMVAHist;
178 < TH1* > fTestBgdMVAHist;
182 Double_t fBoostWeight;
183 Double_t fMethodError;
185 Double_t fROC_training;
189 Double_t fOverlap_integral;
191 std::vector<Float_t> *fMVAvalues;
193 DataSetManager* fDataSetManager;
194 TString fHistoricOption;
195 Bool_t fHistoricBoolOption;
200 void GetHelpMessage()
const;
202 ClassDef(MethodBoost,0);