ROOT
6.07/01
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
tmva
tmva
inc
TMVA
VariableDecorrTransform.h
Go to the documentation of this file.
1
// @(#)root/tmva $Id$
2
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss
3
4
/**********************************************************************************
5
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6
* Package: TMVA *
7
* Class : VariableDecorrTransform *
8
* Web : http://tmva.sourceforge.net *
9
* *
10
* Description: *
11
* Decorrelation of input variables *
12
* *
13
* Authors (alphabetical): *
14
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
15
* Joerg Stelzer <Joerg.Stelzer@cern.ch> - CERN, Switzerland *
16
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, Germany *
17
* *
18
* Copyright (c) 2005: *
19
* CERN, Switzerland *
20
* U. of Victoria, Canada *
21
* MPI-K Heidelberg, Germany *
22
* *
23
* Redistribution and use in source and binary forms, with or without *
24
* modification, are permitted according to the terms listed in LICENSE *
25
* (http://tmva.sourceforge.net/LICENSE) *
26
**********************************************************************************/
27
28
#ifndef ROOT_TMVA_VariableDecorrTransform
29
#define ROOT_TMVA_VariableDecorrTransform
30
31
//////////////////////////////////////////////////////////////////////////
32
// //
33
// VariableDecorrTransform //
34
// //
35
// Linear interpolation class //
36
// //
37
//////////////////////////////////////////////////////////////////////////
38
39
#ifndef ROOT_TMatrixDfwd
40
#include "
TMatrixDfwd.h
"
41
#endif
42
43
#ifndef ROOT_TMatrixDSymfwd
44
#include "
TMatrixDSymfwd.h
"
45
#endif
46
47
#ifndef ROOT_TMVA_VariableTransformBase
48
#include "
TMVA/VariableTransformBase.h
"
49
#endif
50
51
namespace
TMVA {
52
53
class
VariableDecorrTransform
:
public
VariableTransformBase
{
54
55
public
:
56
57
VariableDecorrTransform
(
DataSetInfo
& dsi );
58
virtual
~VariableDecorrTransform
(
void
);
59
60
void
Initialize
();
61
Bool_t
PrepareTransformation
(
const
std::vector<Event*>&);
62
63
// virtual const Event* Transform(const Event* const, Types::ESBType type = Types::kMaxSBType) const;
64
virtual
const
Event
*
Transform
(
const
Event
*
const
,
Int_t
cls )
const
;
65
virtual
const
Event
*
InverseTransform
(
const
Event
*
const
,
Int_t
cls )
const
;
66
67
void
WriteTransformationToStream
( std::ostream& )
const
;
68
void
ReadTransformationFromStream
( std::istream&,
const
TString
& );
69
70
virtual
void
AttachXMLTo
(
void
* parent);
71
virtual
void
ReadFromXML
(
void
* trfnode );
72
73
virtual
void
PrintTransformation
( std::ostream & o );
74
75
// writer of function code
76
virtual
void
MakeFunction
( std::ostream& fout,
const
TString
& fncName,
Int_t
part,
UInt_t
trCounter,
Int_t
cls );
77
78
// provides string vector giving explicit transformation
79
std::vector<TString>*
GetTransformationStrings
(
Int_t
cls )
const
;
80
81
private
:
82
83
// mutable Event* fTransformedEvent; //! local event copy
84
std::vector<TMatrixD*>
fDecorrMatrices
;
//! Decorrelation matrix [class0/class1/.../all classes]
85
86
void
CalcSQRMats
(
const
std::vector< Event*>&,
Int_t
maxCls );
87
std::vector<TMatrixDSym*>*
CalcCovarianceMatrices
(
const
std::vector<const Event*>& events,
Int_t
maxCls );
88
89
ClassDef
(
VariableDecorrTransform
,0)
// Variable transformation: decorrelation
90
};
91
92
}
// namespace TMVA
93
94
#endif
95
TMVA::VariableDecorrTransform::PrepareTransformation
Bool_t PrepareTransformation(const std::vector< Event * > &)
calculate the decorrelation matrix and the normalization
Definition:
VariableDecorrTransform.cxx:77
TMVA::VariableDecorrTransform::PrintTransformation
virtual void PrintTransformation(std::ostream &o)
prints the transformation matrix
Definition:
VariableDecorrTransform.cxx:410
TString
Basic string class.
Definition:
TString.h:137
Int_t
int Int_t
Definition:
RtypesCore.h:41
Bool_t
bool Bool_t
Definition:
RtypesCore.h:59
TMVA::VariableDecorrTransform::~VariableDecorrTransform
virtual ~VariableDecorrTransform(void)
destructor
Definition:
VariableDecorrTransform.cxx:60
TMVA::VariableDecorrTransform::MakeFunction
virtual void MakeFunction(std::ostream &fout, const TString &fncName, Int_t part, UInt_t trCounter, Int_t cls)
creates C++ code fragment of the decorrelation transform for inclusion in standalone C++ class ...
Definition:
VariableDecorrTransform.cxx:422
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:254
TMVA::VariableDecorrTransform::ReadFromXML
virtual void ReadFromXML(void *trfnode)
Read the transformation matrices from the xml node.
Definition:
VariableDecorrTransform.cxx:318
TMVA::DataSetInfo
Definition:
DataSetInfo.h:78
TMVA::VariableDecorrTransform::Initialize
void Initialize()
initialisation
Definition:
VariableDecorrTransform.cxx:70
TMVA::VariableTransformBase
Definition:
VariableTransformBase.h:67
TMVA::Event
Definition:
Event.h:57
TMVA::VariableDecorrTransform::ReadTransformationFromStream
void ReadTransformationFromStream(std::istream &, const TString &)
Read the decorellation matrix from an input stream.
Definition:
VariableDecorrTransform.cxx:366
UInt_t
unsigned int UInt_t
Definition:
RtypesCore.h:42
TMVA::VariableDecorrTransform::CalcSQRMats
void CalcSQRMats(const std::vector< Event * > &, Int_t maxCls)
Decorrelation matrix [class0/class1/.../all classes].
Definition:
VariableDecorrTransform.cxx:240
TMVA::VariableDecorrTransform::WriteTransformationToStream
void WriteTransformationToStream(std::ostream &) const
write the decorrelation matrix to the stream
Definition:
VariableDecorrTransform.cxx:268
TMVA::VariableDecorrTransform
Definition:
VariableDecorrTransform.h:53
TMVA::VariableDecorrTransform::GetTransformationStrings
std::vector< TString > * GetTransformationStrings(Int_t cls) const
creates string with variable transformations applied
Definition:
VariableDecorrTransform.cxx:109
TMVA::VariableDecorrTransform::AttachXMLTo
virtual void AttachXMLTo(void *parent)
node attachment to parent
Definition:
VariableDecorrTransform.cxx:291
TMVA::VariableDecorrTransform::InverseTransform
virtual const Event * InverseTransform(const Event *const, Int_t cls) const
apply the inverse decorrelation transformation ...
Definition:
VariableDecorrTransform.cxx:228
TMatrixDSymfwd.h
TMVA::VariableDecorrTransform::CalcCovarianceMatrices
std::vector< TMatrixDSym * > * CalcCovarianceMatrices(const std::vector< const Event * > &events, Int_t maxCls)
VariableTransformBase.h
TMVA::VariableDecorrTransform::Transform
virtual const Event * Transform(const Event *const, Int_t cls) const
apply the decorrelation transformation
Definition:
VariableDecorrTransform.cxx:162
TMVA::VariableDecorrTransform::VariableDecorrTransform
VariableDecorrTransform(DataSetInfo &dsi)
TMVA::VariableDecorrTransform::fDecorrMatrices
std::vector< TMatrixD * > fDecorrMatrices
Definition:
VariableDecorrTransform.h:84
TMatrixDfwd.h