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
VariableNormalizeTransform.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 : VariableNormalizeTransform *
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
* 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) 2005: *
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_VariableNormalizeTransform
30
#define ROOT_TMVA_VariableNormalizeTransform
31
32
//////////////////////////////////////////////////////////////////////////
33
// //
34
// VariableNormalizeTransform //
35
// //
36
// Linear interpolation class //
37
// //
38
//////////////////////////////////////////////////////////////////////////
39
40
#ifndef ROOT_TMatrixDfwd
41
#include "
TMatrixDfwd.h
"
42
#endif
43
44
#ifndef ROOT_TMVA_VariableTransformBase
45
#include "
TMVA/VariableTransformBase.h
"
46
#endif
47
48
namespace
TMVA {
49
50
class
VariableNormalizeTransform
:
public
VariableTransformBase
{
51
52
public
:
53
54
typedef
std::vector<Float_t>
FloatVector
;
55
typedef
std::vector< FloatVector >
VectorOfFloatVectors
;
56
VariableNormalizeTransform
(
DataSetInfo
& dsi );
57
virtual
~VariableNormalizeTransform
(
void
);
58
59
void
Initialize
();
60
Bool_t
PrepareTransformation
(
const
std::vector<Event*>&);
61
62
virtual
const
Event
*
Transform
(
const
Event
*
const
,
Int_t
cls )
const
;
63
virtual
const
Event
*
InverseTransform
(
const
Event
*
const
,
Int_t
cls )
const
;
64
65
void
WriteTransformationToStream
( std::ostream& )
const
;
66
void
ReadTransformationFromStream
( std::istream&,
const
TString
& );
67
void
BuildTransformationFromVarInfo
(
const
std::vector<TMVA::VariableInfo>& var );
68
69
virtual
void
AttachXMLTo
(
void
* parent);
70
virtual
void
ReadFromXML
(
void
* trfnode );
71
72
virtual
void
PrintTransformation
( std::ostream & o );
73
74
// writer of function code
75
virtual
void
MakeFunction
( std::ostream& fout,
const
TString
& fncName,
Int_t
part,
UInt_t
trCounter,
Int_t
cls );
76
77
// provides string vector giving explicit transformation
78
std::vector<TString>*
GetTransformationStrings
(
Int_t
cls )
const
;
79
80
private
:
81
82
void
CalcNormalizationParams
(
const
std::vector< Event*>& events);
83
84
// mutable Event* fTransformedEvent;
85
86
VectorOfFloatVectors
fMin
;
//! Min of source range
87
VectorOfFloatVectors
fMax
;
//! Max of source range
88
89
ClassDef
(
VariableNormalizeTransform
,0)
// Variable transformation: normalization
90
};
91
92
}
// namespace TMVA
93
94
#endif
TMVA::VariableNormalizeTransform::VectorOfFloatVectors
std::vector< FloatVector > VectorOfFloatVectors
Definition:
VariableNormalizeTransform.h:55
TMVA::VariableNormalizeTransform::CalcNormalizationParams
void CalcNormalizationParams(const std::vector< Event * > &events)
compute offset and scale from min and max
Definition:
VariableNormalizeTransform.cxx:205
TMVA::VariableNormalizeTransform::MakeFunction
virtual void MakeFunction(std::ostream &fout, const TString &fncName, Int_t part, UInt_t trCounter, Int_t cls)
creates a normalizing function TODO include target-transformation into makefunction ...
Definition:
VariableNormalizeTransform.cxx:557
TMVA::VariableNormalizeTransform::VariableNormalizeTransform
VariableNormalizeTransform(DataSetInfo &dsi)
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::VariableNormalizeTransform::PrepareTransformation
Bool_t PrepareTransformation(const std::vector< Event * > &)
prepare transformation
Definition:
VariableNormalizeTransform.cxx:86
TMVA::VariableNormalizeTransform
Definition:
VariableNormalizeTransform.h:50
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:254
TMVA::VariableNormalizeTransform::Transform
virtual const Event * Transform(const Event *const, Int_t cls) const
Definition:
VariableNormalizeTransform.cxx:103
TMVA::DataSetInfo
Definition:
DataSetInfo.h:78
TMVA::VariableNormalizeTransform::PrintTransformation
virtual void PrintTransformation(std::ostream &o)
prints the transformation ranges
Definition:
VariableNormalizeTransform.cxx:530
TMVA::VariableNormalizeTransform::fMin
VectorOfFloatVectors fMin
Definition:
VariableNormalizeTransform.h:86
TMVA::VariableNormalizeTransform::InverseTransform
virtual const Event * InverseTransform(const Event *const, Int_t cls) const
apply the inverse transformation
Definition:
VariableNormalizeTransform.cxx:160
TMVA::VariableNormalizeTransform::~VariableNormalizeTransform
virtual ~VariableNormalizeTransform(void)
Definition:
VariableNormalizeTransform.cxx:61
TMVA::VariableNormalizeTransform::WriteTransformationToStream
void WriteTransformationToStream(std::ostream &) const
write the transformation to the stream
Definition:
VariableNormalizeTransform.cxx:300
TMVA::VariableTransformBase
Definition:
VariableTransformBase.h:67
TMVA::VariableNormalizeTransform::AttachXMLTo
virtual void AttachXMLTo(void *parent)
create XML description of Normalize transformation
Definition:
VariableNormalizeTransform.cxx:325
TMVA::Event
Definition:
Event.h:57
UInt_t
unsigned int UInt_t
Definition:
RtypesCore.h:42
TMVA::VariableNormalizeTransform::GetTransformationStrings
std::vector< TString > * GetTransformationStrings(Int_t cls) const
creates string with variable transformations applied
Definition:
VariableNormalizeTransform.cxx:265
TMVA::VariableNormalizeTransform::Initialize
void Initialize()
initialization of the normalization transformation
Definition:
VariableNormalizeTransform.cxx:67
TMVA::VariableNormalizeTransform::BuildTransformationFromVarInfo
void BuildTransformationFromVarInfo(const std::vector< TMVA::VariableInfo > &var)
this method is only used when building a normalization transformation from old text files in this cas...
Definition:
VariableNormalizeTransform.cxx:458
TMVA::VariableNormalizeTransform::fMax
VectorOfFloatVectors fMax
Min of source range.
Definition:
VariableNormalizeTransform.h:87
TMVA::VariableNormalizeTransform::FloatVector
std::vector< Float_t > FloatVector
Definition:
VariableNormalizeTransform.h:54
TMVA::VariableNormalizeTransform::ReadFromXML
virtual void ReadFromXML(void *trfnode)
Read the transformation matrices from the xml node.
Definition:
VariableNormalizeTransform.cxx:351
VariableTransformBase.h
TMatrixDfwd.h
TMVA::VariableNormalizeTransform::ReadTransformationFromStream
void ReadTransformationFromStream(std::istream &, const TString &)
Read the variable ranges from an input stream.
Definition:
VariableNormalizeTransform.cxx:487