File indexing completed on 2025-01-30 10:22:57
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 #ifndef ROOT_TMVA_ResultsRegression
0030 #define ROOT_TMVA_ResultsRegression
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040 #include <vector>
0041
0042 #include "TH1F.h"
0043 #include "TH2F.h"
0044
0045 #include "TMVA/Results.h"
0046 #include "TMVA/Event.h"
0047
0048 namespace TMVA {
0049
0050 class MsgLogger;
0051
0052 class ResultsRegression : public Results {
0053
0054 public:
0055 ResultsRegression(const DataSetInfo *dsi, TString resultsName);
0056 ~ResultsRegression();
0057
0058
0059 void SetValue(std::vector<Float_t> &value, Int_t ievt);
0060 void Resize(Int_t entries) { fRegValues.resize(entries); }
0061
0062 using TObject::Clear;
0063 void Clear(Option_t *) override { fRegValues.clear(); }
0064
0065
0066 Long64_t GetSize() const { return fRegValues.size(); }
0067 const std::vector<Float_t> &operator[](Int_t ievt) const override { return fRegValues.at(ievt); }
0068 std::vector<std::vector<Float_t>> *GetValueVector() { return &fRegValues; }
0069
0070 TH2F *DeviationAsAFunctionOf(UInt_t varNum, UInt_t tgtNum);
0071 TH1F *QuadraticDeviation(UInt_t tgtNum, Bool_t truncate = false, Double_t truncvalue = 0.);
0072 void CreateDeviationHistograms(TString prefix);
0073
0074 Types::EAnalysisType GetAnalysisType() override { return Types::kRegression; }
0075
0076 private:
0077 mutable std::vector<std::vector<Float_t>> fRegValues;
0078 mutable MsgLogger *fLogger;
0079 MsgLogger &Log() const { return *fLogger; }
0080
0081 protected:
0082 ClassDefOverride(ResultsRegression, 3);
0083 };
0084 }
0085
0086 #endif