72 Types::EMVA methodType,
76 :
TMVA::
MethodBase( jobName, methodType, methodTitle, theData, theOption),
77 fCurrentMethodIdx(0), fCurrentMethod(0)
86 fCurrentMethodIdx(0), fCurrentMethod(0)
94 std::vector<IMethod*>::const_iterator itrMethod =
fMethods.begin();
95 std::vector<IMethod*>::const_iterator itrMethodEnd =
fMethods.end();
97 for (; itrMethod != itrMethodEnd; itrMethod++) {
109 std::vector<IMethod*>::const_iterator itrMethod =
fMethods.begin()+index;
110 if (itrMethod<
fMethods.end())
return *itrMethod;
146 std::vector<IMethod*>::iterator itrMethod =
fMethods.begin();
147 for (; itrMethod !=
fMethods.end(); itrMethod++) {
148 Log() << kVERBOSE <<
"Delete method: " << (*itrMethod)->
GetName() <<
Endl;
160 TString methodName, methodTypeName, jobName, optionString;
167 for (
UInt_t i=0; i< nMethods; i++) {
168 Double_t methodWeight, methodSigCut, methodSigCutOrientation;
171 gTools().
ReadAttr( ch,
"MethodSigCutOrientation", methodSigCutOrientation);
178 if (
gTools().HasAttr( ch,
"UseMainMethodTransformation")) {
180 gTools().
ReadAttr( ch,
"UseMainMethodTransformation", rerouteString );
197 std::string(methodTypeName),jobName, methodName,
DataInfo(),optionString));
203 Log() << kFATAL <<
"Could not read method from XML" <<
Endl;
239 istr >> dummy >> methodNum;
240 Log() << kINFO <<
"Read " << methodNum <<
" Classifiers" <<
Endl;
244 for (
UInt_t i=0; i<methodNum; i++) {
245 istr >> dummy >> methodName >> dummy >>
fCurrentMethodIdx >> dummy >> methodWeight;
247 Log() << kFATAL <<
"Error while reading weight file; mismatch MethodIndex=" 249 <<
" MethodName " << methodName
250 <<
" dummy " << dummy
251 <<
" MethodWeight= " << methodWeight
255 istr >> dummy >> jobName;
256 istr >> dummy >> methodTitle;
257 istr >> dummy >> optionString;
263 methodTitle,
DataInfo(), optionString) );
266 m->ReadWeightsFromStream(istr);
static ClassifierFactory & Instance()
access to the ClassifierFactory singleton creates the instance if needed
MethodCompositeBase(const TString &jobName, Types::EMVA methodType, const TString &methodTitle, DataSetInfo &theData, const TString &theOption="")
void SetModelPersistence(Bool_t status)
void SetMsgType(EMsgType t)
MsgLogger & Endl(MsgLogger &ml)
Singleton class for Global types used by TMVA.
void ReadWeightsFromXML(void *wghtnode)
XML streamer.
TString & ReplaceAll(const TString &s1, const TString &s2)
static Types & Instance()
the the single instance of "Types" if existing already, or create it (Singleton)
TransformationHandler * fTransformationPointer
Virtual base Class for all MVA method.
void SetSignalReferenceCutOrientation(Double_t cutOrientation)
TransformationHandler & GetTransformationHandler(Bool_t takeReroutedIfAvailable=true)
void ToLower()
Change string to lower-case.
void SetSilentFile(Bool_t status)
void ReadWeightsFromStream(std::istream &istr)
text streamer
void AddWeightsXMLTo(void *parent) const
IMethod * GetMethod(const TString &title) const
returns pointer to MVA that corresponds to given method title
std::vector< Double_t > fMethodWeight
Virtual base class for combining several TMVA method.
virtual ~MethodCompositeBase(void)
delete methods
virtual void ParseOptions()
options parser
void SetupMethod()
setup of methods
DataSetInfo & DataInfo() const
Class that contains all the data information.
virtual void AddWeightsXMLTo(void *parent) const =0
Class for boosting a TMVA method.
virtual void ReadWeightsFromXML(void *wghtnode)=0
char * Form(const char *fmt,...)
const TString & GetJobName() const
const TString & GetMethodName() const
Double_t GetSignalReferenceCutOrientation() const
virtual void CheckSetup()
check may be overridden by derived class (sometimes, eg, fitters are used which can only be implement...
void RerouteTransformationHandler(TransformationHandler *fTargetTransformation)
static RooMathCoreReg dummy
virtual const char * GetName() const
Returns name of object.
void ProcessSetup()
process all options the "CheckForUnusedOptions" is done in an independent call, since it may be overr...
const TString & GetOptions() const
Interface for all concrete MVA method implementations.
std::vector< IMethod * > fMethods
Abstract ClassifierFactory template that handles arbitrary types.
Double_t GetMvaValue(Double_t *err=0, Double_t *errUpper=0)
return composite MVA response
TString GetMethodTypeName() const
void SetWeightFileDir(TString fileDir)
set directory of weight file
Double_t GetSignalReferenceCut() const
virtual const char * GetName() const
Returns name of object.
Types::EMVA GetMethodType() const
void NoErrorCalc(Double_t *const err, Double_t *const errUpper)
void SetSignalReferenceCut(Double_t cut)
Bool_t IsModelPersistence()