31 #ifndef ROOT_TMVA_MethodCompositeBase
32 #define ROOT_TMVA_MethodCompositeBase
50 class MethodCompositeBase :
public MethodBase {
53 MethodCompositeBase(
const TString& jobName,
54 Types::EMVA methodType,
55 const TString& methodTitle,
57 const TString& theOption =
"" );
60 MethodCompositeBase( Types::EMVA methodType,
62 const TString& weightFile );
64 using MethodBase::ReadWeightsFromStream;
67 void AddWeightsXMLTo(
void* parent )
const;
68 void ReadWeightsFromXML(
void* wghtnode );
71 Double_t GetMvaValue( Double_t* err = 0, Double_t* errUpper = 0 );
73 using MethodBase::GetMvaValue;
76 void ReadWeightsFromStream( std::istream& istr );
79 virtual void Train() = 0;
82 virtual const Ranking* CreateRanking() = 0;
84 virtual ~MethodCompositeBase(
void );
88 void DeclareOptions() = 0;
89 void ProcessOptions() = 0;
91 IMethod* GetMethod(
const TString& title )
const;
93 IMethod* GetMethod(
const Int_t index )
const;
96 UInt_t fCurrentMethodIdx;
97 MethodBase* fCurrentMethod;
98 UInt_t GetCurrentMethodIndex() {
return fCurrentMethodIdx; }
100 IMethod* GetLastMethod() {
return fMethods.back(); }
102 IMethod* GetPreviousMethod() {
return (fCurrentMethodIdx>0)?fMethods[fCurrentMethodIdx-1]:0; }
104 MethodBase* GetCurrentMethod(){
return fCurrentMethod;}
105 MethodBase* GetCurrentMethod(UInt_t idx){
return dynamic_cast<MethodBase*
>(fMethods.at(idx)); }
109 std::vector<IMethod*> fMethods;
112 std::vector<Double_t> fMethodWeight;
114 ClassDef(MethodCompositeBase,0);