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
0024
0025
0026
0027
0028
0029 #ifndef ROOT_TMVA_ResultsClassification
0030 #define ROOT_TMVA_ResultsClassification
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040 #include <vector>
0041
0042 #include "TMVA/Results.h"
0043
0044 namespace TMVA {
0045
0046 class MsgLogger;
0047
0048 class ResultsClassification : public Results {
0049
0050 public:
0051 ResultsClassification(const DataSetInfo *dsi, TString resultsName);
0052 ~ResultsClassification();
0053
0054
0055
0056 void SetValue(Float_t value, Int_t ievt, Bool_t type);
0057
0058 void Resize(Int_t entries)
0059 {
0060 fMvaValues.resize(entries);
0061 fMvaValuesTypes.resize(entries);
0062 }
0063 using TObject::Clear;
0064 void Clear(Option_t *) override
0065 {
0066 fMvaValues.clear();
0067 fMvaValuesTypes.clear();
0068 }
0069
0070
0071 Long64_t GetSize() const { return fMvaValues.size(); }
0072 const std::vector<Float_t> &operator[](Int_t ievt) const override
0073 {
0074 fRet[0] = fMvaValues[ievt];
0075 return fRet;
0076 }
0077 std::vector<Float_t> *GetValueVector() { return &fMvaValues; }
0078 std::vector<Bool_t> *GetValueVectorTypes() { return &fMvaValuesTypes; }
0079
0080 Types::EAnalysisType GetAnalysisType() override { return Types::kClassification; }
0081
0082 private:
0083 std::vector<Float_t> fMvaValues;
0084 std::vector<Bool_t> fMvaValuesTypes;
0085 mutable std::vector<Float_t> fRet;
0086 mutable MsgLogger *fLogger;
0087 MsgLogger &Log() const { return *fLogger; }
0088
0089 protected:
0090 ClassDefOverride(ResultsClassification, 3);
0091 };
0092 }
0093
0094 #endif