Logo ROOT   6.08/07
Reference Guide
ResultsRegression.h
Go to the documentation of this file.
1 // @(#)root/tmva $Id$
2 // Author: Andreas Hoecker, Peter Speckmayer, Joerg Stelzer, Helge Voss
3 
4 /**********************************************************************************
5  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6  * Package: TMVA *
7  * Class : ResultsRegression *
8  * Web : http://tmva.sourceforge.net *
9  * *
10  * Description: *
11  * Base-class for result-vectors *
12  * *
13  * Authors (alphabetical): *
14  * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
15  * Peter Speckmayer <Peter.Speckmayer@cern.ch> - CERN, Switzerland *
16  * Joerg Stelzer <Joerg.Stelzer@cern.ch> - CERN, Switzerland *
17  * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, Germany *
18  * *
19  * Copyright (c) 2006: *
20  * CERN, Switzerland *
21  * U. of Victoria, Canada *
22  * MPI-K Heidelberg, Germany *
23  * *
24  * Redistribution and use in source and binary forms, with or without *
25  * modification, are permitted according to the terms listed in LICENSE *
26  * (http://tmva.sourceforge.net/LICENSE) *
27  **********************************************************************************/
28 
29 #ifndef ROOT_TMVA_ResultsRegression
30 #define ROOT_TMVA_ResultsRegression
31 
32 //////////////////////////////////////////////////////////////////////////
33 // //
34 // ResultsRegression //
35 // //
36 // Class that is the base-class for a vector of result //
37 // //
38 //////////////////////////////////////////////////////////////////////////
39 
40 #include <vector>
41 
42 #ifndef ROOT_TH1F
43 #include "TH1F.h"
44 #endif
45 #ifndef ROOT_TH2F
46 #include "TH2F.h"
47 #endif
48 
49 #ifndef ROOT_TMVA_Results
50 #include "TMVA/Results.h"
51 #endif
52 #ifndef ROOT_TMVA_Event
53 #include "TMVA/Event.h"
54 #endif
55 
56 namespace TMVA {
57 
58  class MsgLogger;
59 
60  class ResultsRegression : public Results {
61 
62  public:
63 
64  ResultsRegression( const DataSetInfo* dsi, TString resultsName );
66 
67  // setters
68  void SetValue( std::vector<Float_t>& value, Int_t ievt );
69  void Resize( Int_t entries ) { fRegValues.resize( entries ); }
70 
71  using TObject::Clear;
72  virtual void Clear(Option_t *) { fRegValues.clear(); }
73 
74  // getters
75  Long64_t GetSize() const { return fRegValues.size(); }
76  virtual const std::vector< Float_t >& operator [] ( Int_t ievt ) const { return fRegValues.at(ievt); }
77  std::vector<std::vector< Float_t> >* GetValueVector() { return &fRegValues; }
78 
79  TH2F* DeviationAsAFunctionOf( UInt_t varNum, UInt_t tgtNum );
80  TH1F* QuadraticDeviation( UInt_t tgtNum, Bool_t truncate = false, Double_t truncvalue = 0. );
81  void CreateDeviationHistograms( TString prefix );
82 
84 
85 
86  private:
87 
88  mutable std::vector<std::vector< Float_t> > fRegValues; // mva values (Results)
89  mutable MsgLogger* fLogger; //! message logger
90  MsgLogger& Log() const { return *fLogger; }
91  protected:
92 
94 
95  };
96 }
97 
98 #endif
virtual void Clear(Option_t *="")
Definition: TObject.h:89
std::vector< std::vector< Float_t > > fRegValues
std::vector< std::vector< Float_t > > * GetValueVector()
long long Long64_t
Definition: RtypesCore.h:69
const char Option_t
Definition: RtypesCore.h:62
virtual const std::vector< Float_t > & operator[](Int_t ievt) const
EAnalysisType
Definition: Types.h:129
Basic string class.
Definition: TString.h:137
tomato 1-D histogram with a float per channel (see TH1 documentation)}
Definition: TH1.h:575
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TH2F * DeviationAsAFunctionOf(UInt_t varNum, UInt_t tgtNum)
void SetValue(std::vector< Float_t > &value, Int_t ievt)
#define ClassDef(name, id)
Definition: Rtypes.h:254
Long64_t GetSize() const
tomato 2-D histogram with a float per channel (see TH1 documentation)}
Definition: TH2.h:255
unsigned int UInt_t
Definition: RtypesCore.h:42
ResultsRegression(const DataSetInfo *dsi, TString resultsName)
constructor
MsgLogger & Log() const
message logger
double Double_t
Definition: RtypesCore.h:55
void Resize(Int_t entries)
Abstract ClassifierFactory template that handles arbitrary types.
Types::EAnalysisType GetAnalysisType()
void CreateDeviationHistograms(TString prefix)
virtual void Clear(Option_t *)
TH1F * QuadraticDeviation(UInt_t tgtNum, Bool_t truncate=false, Double_t truncvalue=0.)