Logo ROOT  
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 #include "TH1F.h"
43 #include "TH2F.h"
44 
45 #include "TMVA/Results.h"
46 #include "TMVA/Event.h"
47 
48 namespace TMVA {
49 
50  class MsgLogger;
51 
52  class ResultsRegression : public Results {
53 
54  public:
55 
56  ResultsRegression( const DataSetInfo* dsi, TString resultsName );
58 
59  // setters
60  void SetValue( std::vector<Float_t>& value, Int_t ievt );
61  void Resize( Int_t entries ) { fRegValues.resize( entries ); }
62 
63  using TObject::Clear;
64  virtual void Clear(Option_t *) { fRegValues.clear(); }
65 
66  // getters
67  Long64_t GetSize() const { return fRegValues.size(); }
68  virtual const std::vector< Float_t >& operator [] ( Int_t ievt ) const { return fRegValues.at(ievt); }
69  std::vector<std::vector< Float_t> >* GetValueVector() { return &fRegValues; }
70 
71  TH2F* DeviationAsAFunctionOf( UInt_t varNum, UInt_t tgtNum );
72  TH1F* QuadraticDeviation( UInt_t tgtNum, Bool_t truncate = false, Double_t truncvalue = 0. );
73  void CreateDeviationHistograms( TString prefix );
74 
76 
77 
78  private:
79 
80  mutable std::vector<std::vector< Float_t> > fRegValues; // mva values (Results)
81  mutable MsgLogger* fLogger; //! message logger
82  MsgLogger& Log() const { return *fLogger; }
83  protected:
84 
86 
87  };
88 }
89 
90 #endif
TMVA::ResultsRegression::Clear
virtual void Clear(Option_t *)
Definition: ResultsRegression.h:87
TH1F.h
TMVA::ResultsRegression::DeviationAsAFunctionOf
TH2F * DeviationAsAFunctionOf(UInt_t varNum, UInt_t tgtNum)
Definition: ResultsRegression.cxx:115
TMVA::Types::kRegression
@ kRegression
Definition: Types.h:152
TH2F
2-D histogram with a float per channel (see TH1 documentation)}
Definition: TH2.h:251
TMVA::ResultsRegression::Log
MsgLogger & Log() const
message logger
Definition: ResultsRegression.h:105
Long64_t
long long Long64_t
Definition: RtypesCore.h:73
TMVA::ResultsRegression::Resize
void Resize(Int_t entries)
Definition: ResultsRegression.h:84
Int_t
int Int_t
Definition: RtypesCore.h:45
TMVA::ResultsRegression::operator[]
virtual const std::vector< Float_t > & operator[](Int_t ievt) const
Definition: ResultsRegression.h:91
TMVA::ResultsRegression
Definition: ResultsRegression.h:75
TString
Definition: TString.h:136
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TMVA::ResultsRegression::~ResultsRegression
~ResultsRegression()
destructor
Definition: ResultsRegression.cxx:60
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TMVA::Types::EAnalysisType
EAnalysisType
Definition: Types.h:150
TMVA::ResultsRegression::CreateDeviationHistograms
void CreateDeviationHistograms(TString prefix)
Definition: ResultsRegression.cxx:203
TMVA::ResultsRegression::fRegValues
std::vector< std::vector< Float_t > > fRegValues
Definition: ResultsRegression.h:103
TMVA::ResultsRegression::QuadraticDeviation
TH1F * QuadraticDeviation(UInt_t tgtNum, Bool_t truncate=false, Double_t truncvalue=0.)
Definition: ResultsRegression.cxx:75
Event.h
TMVA::ResultsRegression::fLogger
MsgLogger * fLogger
Definition: ResultsRegression.h:104
UInt_t
unsigned int UInt_t
Definition: RtypesCore.h:46
TMVA::ResultsRegression::GetAnalysisType
Types::EAnalysisType GetAnalysisType()
Definition: ResultsRegression.h:98
TH2F.h
Double_t
double Double_t
Definition: RtypesCore.h:59
TMVA::ResultsRegression::SetValue
void SetValue(std::vector< Float_t > &value, Int_t ievt)
Definition: ResultsRegression.cxx:67
TMVA::MsgLogger
Definition: MsgLogger.h:83
TMVA::ResultsRegression::GetValueVector
std::vector< std::vector< Float_t > > * GetValueVector()
Definition: ResultsRegression.h:92
TMVA::ResultsRegression::GetSize
Long64_t GetSize() const
Definition: ResultsRegression.h:90
TH1F
1-D histogram with a float per channel (see TH1 documentation)}
Definition: TH1.h:572
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
Results.h
TMVA::ResultsRegression::ResultsRegression
ResultsRegression(const DataSetInfo *dsi, TString resultsName)
constructor
Definition: ResultsRegression.cxx:51
TObject::Clear
virtual void Clear(Option_t *="")
Definition: TObject.h:100
TMVA
create variable transformations
Definition: GeneticMinimizer.h:22