35 :
TMVA::
MethodBase(jobName,
Types::kCrossValidation, methodTitle, theData, theOption), fSplitExpr(nullptr)
60 "Combines output from contained methods. If None, no combination is performed. (default None)");
90 Log() << kINFO <<
"Reading weightfile: " << weightfile <<
Endl;
117 Log() << kFATAL << iFold <<
" out of range. " 160 Log() << kFATAL <<
"MethodCategory not supported for the moment." <<
Endl;
221 Log() << kINFO <<
"Reading weightfile: " << weightfile <<
Endl;
238 Log() << kFATAL <<
"CrossValidation currently supports only reading from XML." <<
Endl;
261 val +=
m->GetMvaValue(err, errUpper);
263 return val / fEncapsulatedMethods.size();
294 auto methodValues =
m->GetMulticlassValues();
295 for (
size_t i = 0; i < methodValues.size(); ++i) {
296 fMulticlassValues[i] += methodValues[i];
300 for (
auto &
e : fMulticlassValues) {
301 e /= fEncapsulatedMethods.size();
336 auto methodValues =
m->GetRegressionValues();
337 for (
size_t i = 0; i < methodValues.size(); ++i) {
338 fRegressionValues[i] += methodValues[i];
342 for (
auto &
e : fRegressionValues) {
343 e /= fEncapsulatedMethods.size();
371 <<
"Method CrossValidation should not be created manually," 372 " only as part of using TMVA::Reader." 400 Log() << kWARNING <<
"MakeClassSpecific not implemented for CrossValidation" <<
Endl;
408 Log() << kWARNING <<
"MakeClassSpecificHeader not implemented for CrossValidation" <<
Endl;
IMethod * Create(const std::string &name, const TString &job, const TString &title, DataSetInfo &dsi, const TString &option)
creates the method if needed based on the method name using the creator function the factory has stor...
static ClassifierFactory & Instance()
access to the ClassifierFactory singleton creates the instance if needed
Types::EAnalysisType fAnalysisType
void ReadWeightsFromStream(std::istream &istr)
Read the weights.
MsgLogger & Endl(MsgLogger &ml)
MethodBase * InstantiateMethodFromXML(TString methodTypeName, TString weightfile) const
Reads in a weight file an instantiates the corresponding method.
Singleton class for Global types used by TMVA.
TString fEncapsulatedMethodName
void WriteMonitoringHistosToFile(void) const
write special monitoring histograms to file dummy implementation here --------------— ...
void GetHelpMessage() const
void ReadWeightsFromXML(void *parent)
Reads from the xml file.
Double_t GetMvaValue(Double_t *err=0, Double_t *errUpper=0)
OptionBase * DeclareOptionRef(T &ref, const TString &name, const TString &desc="")
Virtual base Class for all MVA method.
void DeclareCompatibilityOptions()
Options that are used ONLY for the READER to ensure backward compatibility.
Ranking for variables in method (implementation)
virtual const char * DirName(const char *pathname)
Return the directory name in pathname.
UInt_t GetNClasses() const
void Reset(void)
Reset the method, as if it had just been instantiated (forget all training etc.). ...
const std::vector< Float_t > & GetRegressionValues()
Get the regression value generated by the containing methods.
const Event * GetEvent() const
void ReadStateFromFile()
Function to write options and weights to file.
MethodCrossValidation(const TString &jobName, const TString &methodTitle, DataSetInfo &theData, const TString &theOption="")
std::vector< Float_t > fMulticlassValues
void SetupMethod()
setup of methods
DataSetInfo & DataInfo() const
Class that contains all the data information.
std::unique_ptr< CvSplitKFoldsExpr > fSplitExpr
virtual ~MethodCrossValidation(void)
Destructor.
UInt_t GetNTargets() const
R__EXTERN TSystem * gSystem
const char * GetName() const
Bool_t HasAnalysisType(Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets)
void ProcessOptions()
The option string is decoded, for available options see "DeclareOptions".
char * Form(const char *fmt,...)
void Train(void)
Call the Optimizer with the set of parameters and ranges that are meant to be tuned.
void MakeClassSpecificHeader(std::ostream &, const TString &) const
Specific class header.
TString GetWeightFileName() const
retrieve weight file name
void Init(void)
Common initialisation with defaults for the Method.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
std::vector< Float_t > fRegressionValues
void AddPreDefVal(const T &)
const Ranking * CreateRanking()
#define REGISTER_METHOD(CLASS)
for example
TString GetWeightFileNameForFold(UInt_t iFold) const
Returns filename of weight file for a given fold.
Abstract ClassifierFactory template that handles arbitrary types.
virtual void DeclareCompatibilityOptions()
options that are used ONLY for the READER to ensure backward compatibility they are hence without any...
void AddWeightsXMLTo(void *parent) const
Write weights to XML.
void SetWeightFileDir(TString fileDir)
set directory of weight file
const std::vector< Float_t > & GetMulticlassValues()
Get the multiclass MVA response.
std::vector< MethodBase * > fEncapsulatedMethods
std::map< const TMVA::Event *, UInt_t > fEventToFoldMapping
TString fEncapsulatedMethodTypeName
Types::EMVA GetMethodType() const
TString fOutputEnsembling
virtual void SetAnalysisType(Types::EAnalysisType type)
void MakeClassSpecific(std::ostream &, const TString &) const
Make ROOT-independent C++ class for classifier response (classifier-specific implementation).
const char * Data() const