File indexing completed on 2025-01-18 10:11:04
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #ifndef ROOT_TMVA_ROCCurve
0024 #define ROOT_TMVA_ROCCurve
0025
0026 #include "RtypesCore.h"
0027
0028 #include <tuple>
0029 #include <utility>
0030 #include <vector>
0031
0032 class TList;
0033 class TTree;
0034 class TString;
0035 class TH1;
0036 class TH2;
0037 class TH2F;
0038 class TSpline;
0039 class TSpline1;
0040 class TGraph;
0041
0042 namespace TMVA {
0043
0044 class MsgLogger;
0045
0046 class ROCCurve {
0047
0048 public:
0049 ROCCurve(const std::vector<std::tuple<Float_t, Float_t, Bool_t>> &mvas);
0050
0051 ROCCurve(const std::vector<Float_t> &mvaValues, const std::vector<Bool_t> &mvaTargets,
0052 const std::vector<Float_t> &mvaWeights);
0053
0054 ROCCurve(const std::vector<Float_t> &mvaValues, const std::vector<Bool_t> &mvaTargets);
0055
0056 ROCCurve(const std::vector<Float_t> &mvaSignal, const std::vector<Float_t> &mvaBackground,
0057 const std::vector<Float_t> &mvaSignalWeights, const std::vector<Float_t> &mvaBackgroundWeights);
0058
0059 ROCCurve(const std::vector<Float_t> &mvaSignal, const std::vector<Float_t> &mvaBackground);
0060
0061 ~ROCCurve();
0062
0063 Double_t GetEffSForEffB(Double_t effB, const UInt_t num_points = 41);
0064
0065 Double_t GetROCIntegral(const UInt_t points = 41);
0066 TGraph *GetROCCurve(const UInt_t points = 100);
0067
0068 const std::vector<std::tuple<Float_t, Float_t, Bool_t>> GetMvas() const { return fMva; }
0069 private:
0070 mutable MsgLogger *fLogger;
0071 MsgLogger &Log() const;
0072
0073 TGraph *fGraph;
0074
0075 std::vector<std::tuple<Float_t, Float_t, Bool_t>> fMva;
0076
0077 std::vector<Double_t> ComputeSensitivity(const UInt_t num_points);
0078 std::vector<Double_t> ComputeSpecificity(const UInt_t num_points);
0079 };
0080 }
0081 #endif