23 #ifndef ROOT_TMVA_Tools 26 #ifndef ROOT_TMVA_ROCCurve 29 #ifndef ROOT_TMVA_Config 32 #ifndef ROOT_TMVA_Version 35 #ifndef ROOT_TMVA_MsgLogger 51 assert(mva.size() == mvat.size() );
52 for(
UInt_t i=0;i<mva.size();i++)
54 if(mvat[i] )
fMvaS.push_back(mva[i]);
55 else fMvaB.push_back(mva[i]);
82 for(
Float_t i=-1.0;i<1.0;i+=(1.0/ndivisions))
91 if(
fMvaS[j] > i) acounter++;
94 if(
fMvaB[j] > i) ccounter++;
98 if(acounter != 0 || bcounter != 0)
100 epsilon_s = 1.0*bcounter/(acounter+bcounter);
104 if(ccounter != 0 || dcounter != 0)
106 epsilon_b = 1.0*dcounter/(ccounter+dcounter);
123 const UInt_t ndivisions = points - 1;
132 for(
UInt_t i = 1; i < ndivisions; i++)
142 if(
fMvaS[j] > threshold)
143 true_positives += 1.0;
145 false_negatives += 1.0;
147 if(
fMvaB[j] > threshold)
148 false_positives += 1.0;
150 true_negatives += 1.0;
154 if ((true_positives > 0.0) || (false_negatives > 0.0))
156 true_positives / (true_positives + false_negatives);
159 if ((true_negatives > 0.0) || (false_positives > 0.0))
161 true_negatives / (true_negatives + false_positives);
ROCCurve(const std::vector< Float_t > &mvaS, const std::vector< Bool_t > &mvat)
std::vector< Float_t > fEpsilonSig
std::vector< Float_t > fMvaB
Double_t GetROCIntegral()
ROC Integral (AUC)
std::vector< Float_t > fMvaS
Abstract ClassifierFactory template that handles arbitrary types.
TGraph * GetROCCurve(const UInt_t points=100)
A Graph is a graphics object made of two arrays X and Y with npoints each.
std::vector< Float_t > fEpsilonBgk