42 for(
auto &roc:
fROCs) avg+=roc.second;
43 return avg/fROCs.size();
54 fLogger<<
kINFO<<
Form(
"Fold %i ROC-Int : %f",item.first,item.second)<<std::endl;
67 fROCCurves->GetXaxis()->SetTitle(
" Signal Efficiency ");
68 fROCCurves->GetYaxis()->SetTitle(
" Background Rejection ");
71 c->
SetTitle(
"Cross Validation ROC Curves");
77 fNumFolds(5),fClassifier(new
TMVA::
Factory(
"CrossValidation",
"!V:!ROC:Silent:!ModelPersistence:!Color:!DrawProgressBar:AnalysisType=Classification"))
107 TString foldTitle = methodTitle;
108 foldTitle +=
"_fold";
117 smethod->TrainMethod();
121 smethod->TestClassification();
std::vector< Double_t > fSigs
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
MsgLogger & Endl(MsgLogger &ml)
void SetTitle(const char *title="")
Set canvas title.
T GetValue(const TString &key)
TCanvas * Draw(const TString name="CrossValidation") const
CrossValidationResult fResults
Float_t GetROCAverage() const
A TMultiGraph is a collection of TGraph (or derived) objects.
std::unique_ptr< Factory > fClassifier
virtual void SetTitle(const char *title="")
Set graph title.
std::vector< Double_t > fEff10s
const char * Data() const
static void SetIsTraining(Bool_t)
when this static function is called, it sets the flag whether events with negative event weight shoul...
void SetNumFolds(UInt_t i)
Base class for all machine learning algorithms.
std::vector< Double_t > fTrainEff01s
std::vector< Double_t > fTrainEff10s
virtual void SetLineColor(Color_t lcolor)
Set the line color.
std::vector< Double_t > fEff01s
char * Form(const char *fmt,...)
std::vector< Double_t > fTrainEff30s
CrossValidation(DataLoader *loader)
virtual void Evaluate()
Virtual method to be implmented with your algorithm.
std::shared_ptr< DataLoader > fDataLoader
TMultiGraph * GetROCCurves(Bool_t fLegend=kTRUE)
std::vector< Double_t > fEffAreas
virtual void Draw(Option_t *option="")
Draw a canvas.
std::vector< Double_t > fSeps
Abstract ClassifierFactory template that handles arbitrary types.
std::map< UInt_t, Float_t > fROCs
std::vector< Double_t > fEff30s
virtual TLegend * BuildLegend(Double_t x1=0.5, Double_t y1=0.67, Double_t x2=0.88, Double_t y2=0.88, const char *title="", Option_t *option="")
Build a legend from the graphical objects in the pad.
static void EnableOutput()
std::shared_ptr< TMultiGraph > fROCCurves