Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
QuickMVAProbEstimator.h
Go to the documentation of this file.
1 #ifndef ROOT_TMVA_QUICKMVAPROBESTIMATOR
2 #define ROOT_TMVA_QUICKMVAPROBESTIMATOR
3 
4 #include <iostream>
5 #include <vector>
6 #include <algorithm>
7 
8 #include "TMVA/MsgLogger.h"
9 
10 namespace TMVA {
11 
12  class QuickMVAProbEstimator {
13  public:
14 
15  struct EventInfo{
16  Double_t eventValue;
17  Double_t eventWeight;
18  Int_t eventType; //signal or background
19  };
20  static bool compare(EventInfo e1, EventInfo e2){return e1.eventValue < e2.eventValue;}
21 
22  QuickMVAProbEstimator(Int_t nMin=40, Int_t nMax=5000):fIsSorted(false),fNMin(nMin),fNMax(nMax){ fLogger = new MsgLogger("QuickMVAProbEstimator");}
23 
24 
25  virtual ~QuickMVAProbEstimator(){delete fLogger;}
26  void AddEvent(Double_t val, Double_t weight, Int_t type);
27 
28 
29  Double_t GetMVAProbAt(Double_t value);
30 
31 
32  private:
33  std::vector<EventInfo> fEvtVector;
34  Bool_t fIsSorted;
35  UInt_t fNMin;
36  UInt_t fNMax;
37 
38  mutable MsgLogger* fLogger;
39  MsgLogger& Log() const { return *fLogger; }
40 
41  ClassDef(QuickMVAProbEstimator,0); // Interface to different separation critiera used in training algorithms
42 
43 
44  };
45 }
46 
47 
48 #endif