33 return fROCCurves.get();
41 MsgLogger fLogger(
"HyperParameterOptimisation");
43 for(
UInt_t j=0; j<fFoldParameters.size(); ++j) {
44 fLogger<<
kHEADER<<
"===========================================================" <<
Endl;
45 fLogger<<
kINFO<<
"Optimisation for " << fMethodName <<
" fold " << j+1 <<
Endl;
47 for(
auto &it : fFoldParameters.at(j)) {
48 fLogger<<
kINFO<< it.first <<
" " << it.second <<
Endl;
57 fFomType(
"Separation"),
61 fClassifier(new TMVA::
Factory(
"HyperParameterOptimisation",
"!V:!ROC:Silent:!ModelPersistence:!Color:!DrawProgressBar:AnalysisType=Classification"))
74 fDataLoader->MakeKFoldDataSet(fNumFolds);
82 TString methodOptions = fMethod.GetValue<
TString>(
"MethodOptions");
86 fDataLoader->MakeKFoldDataSet(fNumFolds);
89 fResults.fMethodName = methodName;
91 for(
UInt_t i = 0; i < fNumFolds; ++i) {
93 TString foldTitle = methodTitle;
100 auto smethod = fClassifier->BookMethod(fDataLoader.get(), methodName, methodTitle, methodOptions);
102 auto params=smethod->OptimizeTuningParameters(fFomType,fFitType);
103 fResults.fFoldParameters.push_back(params);
107 fClassifier->DeleteAllMethods();
109 fClassifier->fMethodsMap.clear();
HyperParameterOptimisationResult()
MsgLogger & Endl(MsgLogger &ml)
A TMultiGraph is a collection of TGraph (or derived) objects.
static void SetIsTraining(Bool_t)
when this static function is called, it sets the flag whether events with negative event weight shoul...
Base class for all machine learning algorithms.
virtual void Evaluate()
Virtual method to be implmented with your algorithm.
void SetNumFolds(UInt_t folds)
HyperParameterOptimisation(DataLoader *dataloader)
~HyperParameterOptimisation()
TMultiGraph * GetROCCurves(Bool_t fLegend=kTRUE)
~HyperParameterOptimisationResult()
static void EnableOutput()