Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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 * *
9 * *
10 * Description: *
11 * Derived-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 * (see tmva/doc/LICENSE) *
27 **********************************************************************************/
28
29#ifndef ROOT_TMVA_ResultsRegression
30#define ROOT_TMVA_ResultsRegression
31
32//////////////////////////////////////////////////////////////////////////
33// //
34// ResultsRegression //
35// //
36// Class that is the derived-class for a vector of results //
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
48namespace TMVA {
49
50class MsgLogger;
51
52class ResultsRegression : public Results {
53
54public:
55 ResultsRegression(const DataSetInfo *dsi, TString resultsName);
57
58 // setters
59 void SetValue(std::vector<Float_t> &value, Int_t ievt);
60 void Resize(Int_t entries) { fRegValues.resize(entries); }
61
62 using TObject::Clear;
63 void Clear(Option_t *) override { fRegValues.clear(); }
64
65 // getters
66 Long64_t GetSize() const { return fRegValues.size(); }
67 const std::vector<Float_t> &operator[](Int_t ievt) const override { return fRegValues.at(ievt); }
68 std::vector<std::vector<Float_t>> *GetValueVector() { return &fRegValues; }
69
71 TH1F *QuadraticDeviation(UInt_t tgtNum, Bool_t truncate = false, Double_t truncvalue = 0.);
73
75
76private:
77 mutable std::vector<std::vector<Float_t>> fRegValues; ///< mva values (Results)
78 mutable MsgLogger *fLogger; ///<! message logger
79 MsgLogger &Log() const { return *fLogger; }
80
81protected:
83};
84} // namespace TMVA
85
86#endif
bool Bool_t
Definition RtypesCore.h:63
unsigned int UInt_t
Definition RtypesCore.h:46
double Double_t
Definition RtypesCore.h:59
long long Long64_t
Definition RtypesCore.h:80
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
1-D histogram with a float per channel (see TH1 documentation)
Definition TH1.h:621
2-D histogram with a float per channel (see TH1 documentation)
Definition TH2.h:307
Class that contains all the data information.
Definition DataSetInfo.h:62
ostringstream derivative to redirect and format output
Definition MsgLogger.h:57
Class that is the base-class for a vector of result.
std::vector< std::vector< Float_t > > * GetValueVector()
MsgLogger * fLogger
! message logger
void SetValue(std::vector< Float_t > &value, Int_t ievt)
std::vector< std::vector< Float_t > > fRegValues
mva values (Results)
TH2F * DeviationAsAFunctionOf(UInt_t varNum, UInt_t tgtNum)
TH1F * QuadraticDeviation(UInt_t tgtNum, Bool_t truncate=false, Double_t truncvalue=0.)
void Resize(Int_t entries)
const std::vector< Float_t > & operator[](Int_t ievt) const override
void Clear(Option_t *) override
MsgLogger & Log() const
void CreateDeviationHistograms(TString prefix)
Types::EAnalysisType GetAnalysisType() override
Class that is the base-class for a vector of result.
Definition Results.h:57
@ kRegression
Definition Types.h:128
virtual void Clear(Option_t *="")
Definition TObject.h:119
Basic string class.
Definition TString.h:139
create variable transformations