69 Types::EMVA methodType,
73 :
TMVA::
MethodBase( jobName, methodType, methodTitle, theData, theOption),
74 fCurrentMethodIdx(0), fCurrentMethod(0)
83 fCurrentMethodIdx(0), fCurrentMethod(0)
91 std::vector<IMethod*>::const_iterator itrMethod =
fMethods.begin();
92 std::vector<IMethod*>::const_iterator itrMethodEnd =
fMethods.end();
94 for (; itrMethod != itrMethodEnd; itrMethod++) {
106 std::vector<IMethod*>::const_iterator itrMethod =
fMethods.begin()+index;
107 if (itrMethod<
fMethods.end())
return *itrMethod;
143 std::vector<IMethod*>::iterator itrMethod =
fMethods.begin();
144 for (; itrMethod !=
fMethods.end(); itrMethod++) {
145 Log() <<
kVERBOSE <<
"Delete method: " << (*itrMethod)->GetName() <<
Endl;
157 TString methodName, methodTypeName, jobName, optionString;
164 for (
UInt_t i=0; i< nMethods; i++) {
165 Double_t methodWeight, methodSigCut, methodSigCutOrientation;
168 gTools().
ReadAttr( ch,
"MethodSigCutOrientation", methodSigCutOrientation);
175 if (
gTools().HasAttr( ch,
"UseMainMethodTransformation")) {
177 gTools().
ReadAttr( ch,
"UseMainMethodTransformation", rerouteString );
194 std::string(methodTypeName),jobName, methodName,
DataInfo(),optionString));
236 istr >> dummy >> methodNum;
237 Log() <<
kINFO <<
"Read " << methodNum <<
" Classifiers" <<
Endl;
241 for (
UInt_t i=0; i<methodNum; i++) {
242 istr >> dummy >> methodName >> dummy >>
fCurrentMethodIdx >> dummy >> methodWeight;
244 Log() <<
kFATAL <<
"Error while reading weight file; mismatch MethodIndex=" 246 <<
" MethodName " << methodName
247 <<
" dummy " << dummy
248 <<
" MethodWeight= " << methodWeight
252 istr >> dummy >> jobName;
253 istr >> dummy >> methodTitle;
254 istr >> dummy >> optionString;
260 methodTitle,
DataInfo(), optionString) );
263 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)
void ReadWeightsFromXML(void *wghtnode)
XML streamer.
TString & ReplaceAll(const TString &s1, const TString &s2)
static Types & Instance()
the the single instance of "Types" if existin already, or create it (Signleton)
TransformationHandler * fTransformationPointer
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 ~MethodCompositeBase(void)
delete methods
virtual void ParseOptions()
options parser
void SetupMethod()
setup of methods
DataSetInfo & DataInfo() const
virtual void AddWeightsXMLTo(void *parent) const =0
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
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
Types::EMVA GetMethodType() const
void NoErrorCalc(Double_t *const err, Double_t *const errUpper)
void SetSignalReferenceCut(Double_t cut)
Bool_t IsModelPersistence()