ROOT
v6-28
Reference Guide
Loading...
Searching...
No Matches
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
#include "
TMatrixDfwd.h
"
41
42
#include "
TMVA/VariableTransformBase.h
"
43
44
#include <vector>
45
46
namespace
TMVA
{
47
48
class
VariableNormalizeTransform
:
public
VariableTransformBase
{
49
50
public
:
51
52
typedef
std::vector<Float_t>
FloatVector
;
53
typedef
std::vector< FloatVector >
VectorOfFloatVectors
;
54
VariableNormalizeTransform
(
DataSetInfo
& dsi );
55
virtual
~VariableNormalizeTransform
(
void
);
56
57
void
Initialize
();
58
Bool_t
PrepareTransformation
(
const
std::vector<Event*>&);
59
60
virtual
const
Event
*
Transform
(
const
Event
*
const
,
Int_t
cls )
const
;
61
virtual
const
Event
*
InverseTransform
(
const
Event
*
const
,
Int_t
cls )
const
;
62
63
void
WriteTransformationToStream
( std::ostream& )
const
;
64
void
ReadTransformationFromStream
( std::istream&,
const
TString
& );
65
void
BuildTransformationFromVarInfo
(
const
std::vector<TMVA::VariableInfo>& var );
66
67
virtual
void
AttachXMLTo
(
void
* parent);
68
virtual
void
ReadFromXML
(
void
* trfnode );
69
70
virtual
void
PrintTransformation
( std::ostream & o );
71
72
// writer of function code
73
virtual
void
MakeFunction
( std::ostream& fout,
const
TString
& fncName,
Int_t
part,
UInt_t
trCounter,
Int_t
cls );
74
75
// provides string vector giving explicit transformation
76
std::vector<TString>*
GetTransformationStrings
(
Int_t
cls )
const
;
77
78
private
:
79
80
void
CalcNormalizationParams
(
const
std::vector< Event*>& events);
81
82
// mutable Event* fTransformedEvent;
83
84
VectorOfFloatVectors
fMin
;
///<! Min of source range
85
VectorOfFloatVectors
fMax
;
///<! Max of source range
86
87
ClassDef
(
VariableNormalizeTransform
,0);
// Variable transformation: normalization
88
};
89
90
}
// namespace TMVA
91
92
#endif
ClassDef
#define ClassDef(name, id)
Definition
Rtypes.h:337
TMatrixDfwd.h
VariableTransformBase.h
TMVA::DataSetInfo
Class that contains all the data information.
Definition
DataSetInfo.h:62
TMVA::Event
Definition
Event.h:51
TMVA::VariableNormalizeTransform
Linear interpolation class.
Definition
VariableNormalizeTransform.h:48
TMVA::VariableNormalizeTransform::~VariableNormalizeTransform
virtual ~VariableNormalizeTransform(void)
Definition
VariableNormalizeTransform.cxx:65
TMVA::VariableNormalizeTransform::CalcNormalizationParams
void CalcNormalizationParams(const std::vector< Event * > &events)
compute offset and scale from min and max
Definition
VariableNormalizeTransform.cxx:209
TMVA::VariableNormalizeTransform::Initialize
void Initialize()
initialization of the normalization transformation
Definition
VariableNormalizeTransform.cxx:71
TMVA::VariableNormalizeTransform::Transform
virtual const Event * Transform(const Event *const, Int_t cls) const
apply the normalization transformation
Definition
VariableNormalizeTransform.cxx:108
TMVA::VariableNormalizeTransform::PrepareTransformation
Bool_t PrepareTransformation(const std::vector< Event * > &)
prepare transformation
Definition
VariableNormalizeTransform.cxx:90
TMVA::VariableNormalizeTransform::InverseTransform
virtual const Event * InverseTransform(const Event *const, Int_t cls) const
apply the inverse transformation
Definition
VariableNormalizeTransform.cxx:164
TMVA::VariableNormalizeTransform::ReadFromXML
virtual void ReadFromXML(void *trfnode)
Read the transformation matrices from the xml node.
Definition
VariableNormalizeTransform.cxx:355
TMVA::VariableNormalizeTransform::AttachXMLTo
virtual void AttachXMLTo(void *parent)
create XML description of Normalize transformation
Definition
VariableNormalizeTransform.cxx:329
TMVA::VariableNormalizeTransform::WriteTransformationToStream
void WriteTransformationToStream(std::ostream &) const
write the transformation to the stream
Definition
VariableNormalizeTransform.cxx:304
TMVA::VariableNormalizeTransform::ReadTransformationFromStream
void ReadTransformationFromStream(std::istream &, const TString &)
Read the variable ranges from an input stream.
Definition
VariableNormalizeTransform.cxx:491
TMVA::VariableNormalizeTransform::fMin
VectorOfFloatVectors fMin
! Min of source range
Definition
VariableNormalizeTransform.h:84
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:559
TMVA::VariableNormalizeTransform::GetTransformationStrings
std::vector< TString > * GetTransformationStrings(Int_t cls) const
creates string with variable transformations applied
Definition
VariableNormalizeTransform.cxx:269
TMVA::VariableNormalizeTransform::fMax
VectorOfFloatVectors fMax
! Max of source range
Definition
VariableNormalizeTransform.h:85
TMVA::VariableNormalizeTransform::PrintTransformation
virtual void PrintTransformation(std::ostream &o)
prints the transformation ranges
Definition
VariableNormalizeTransform.cxx:534
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:462
TMVA::VariableNormalizeTransform::VectorOfFloatVectors
std::vector< FloatVector > VectorOfFloatVectors
Definition
VariableNormalizeTransform.h:53
TMVA::VariableNormalizeTransform::FloatVector
std::vector< Float_t > FloatVector
Definition
VariableNormalizeTransform.h:52
TMVA::VariableTransformBase
Linear interpolation class.
Definition
VariableTransformBase.h:54
TString
Basic string class.
Definition
TString.h:139
bool
int
unsigned int
TMVA
create variable transformations
Definition
GeneticMinimizer.h:22
tmva
tmva
inc
TMVA
VariableNormalizeTransform.h
ROOT v6-28 - Reference Guide Generated on Thu Oct 24 2024 01:49:54 (GVA Time) using Doxygen 1.9.8