73 fCurrentMethodIdx(0), fCurrentMethod(0)
82 fCurrentMethodIdx(0), fCurrentMethod(0)
90 std::vector<IMethod*>::const_iterator
itrMethod = fMethods.
begin();
95 if ( (
mva->GetMethodName())==methodTitle )
return mva;
117 for (
UInt_t i=0; i< fMethods.size(); i++)
129 if (
method->fTransformationPointer)
144 Log() << kVERBOSE <<
"Delete method: " << (*itrMethod)->GetName() <<
Endl;
158 for (
UInt_t i=0;i<fMethods.size();i++)
delete fMethods[i];
160 fMethodWeight.clear();
174 if (
gTools().HasAttr( ch,
"UseMainMethodTransformation")) {
199 Log() << kFATAL <<
"Could not read method from XML" <<
Endl;
206 meth->SetModelPersistence(IsModelPersistence());
207 meth->SetSilentFile(IsSilentFile());
209 meth->SetMsgType(kWARNING);
210 meth->ParseOptions();
211 meth->ProcessSetup();
217 meth->RerouteTransformationHandler (&(this->GetTransformationHandler()));
230 TString methodName, methodTitle = GetMethodName(),
236 Log() << kINFO <<
"Read " <<
methodNum <<
" Classifiers" <<
Endl;
237 for (
UInt_t i=0;i<fMethods.size();i++)
delete fMethods[i];
239 fMethodWeight.clear();
241 istr >> dummy >> methodName >> dummy >> fCurrentMethodIdx >> dummy >>
methodWeight;
242 if ((
UInt_t)fCurrentMethodIdx != i) {
243 Log() << kFATAL <<
"Error while reading weight file; mismatch MethodIndex="
244 << fCurrentMethodIdx <<
" i=" << i
245 <<
" MethodName " << methodName
246 <<
" dummy " << dummy
252 istr >> dummy >> methodTitle;
257 methodTitle =
TString::Format(
"%s (%04i)",GetMethodName().Data(),fCurrentMethodIdx);
263 m->ReadWeightsFromStream(
istr);
273 for (
UInt_t i=0;i< fMethods.size(); i++)
mvaValue+=fMethods[i]->GetMvaValue()*fMethodWeight[i];
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
const_iterator begin() const
const_iterator end() const
static ClassifierFactory & Instance()
access to the ClassifierFactory singleton creates the instance if needed
Class that contains all the data information.
Interface for all concrete MVA method implementations.
Virtual base Class for all MVA method.
friend class MethodCompositeBase
Class for boosting a TMVA method.
void AddWeightsXMLTo(void *parent) const override
virtual ~MethodCompositeBase(void)
delete methods
IMethod * GetMethod(const TString &title) const
accessor by name
void ReadWeightsFromXML(void *wghtnode) override
XML streamer.
Double_t GetMvaValue(Double_t *err=nullptr, Double_t *errUpper=nullptr) override
return composite MVA response
void ReadWeightsFromStream(std::istream &istr) override
text streamer
static Types & Instance()
The single instance of "Types" if existing already, or create it (Singleton)
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
create variable transformations
MsgLogger & Endl(MsgLogger &ml)