File indexing completed on 2025-01-30 10:23:05
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 #ifndef ROOT_TMVA_VariableNormalizeTransform
0030 #define ROOT_TMVA_VariableNormalizeTransform
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040 #include "TMatrixDfwd.h"
0041
0042 #include "TMVA/VariableTransformBase.h"
0043
0044 #include <vector>
0045
0046 namespace TMVA {
0047
0048 class VariableNormalizeTransform : public VariableTransformBase {
0049
0050 public:
0051
0052 typedef std::vector<Float_t> FloatVector;
0053 typedef std::vector< FloatVector > VectorOfFloatVectors;
0054 VariableNormalizeTransform( DataSetInfo& dsi );
0055 virtual ~VariableNormalizeTransform( void );
0056
0057 void Initialize();
0058 Bool_t PrepareTransformation (const std::vector<Event*>&);
0059
0060 virtual const Event* Transform(const Event* const, Int_t cls ) const;
0061 virtual const Event* InverseTransform( const Event* const, Int_t cls ) const;
0062
0063 void WriteTransformationToStream ( std::ostream& ) const;
0064 void ReadTransformationFromStream( std::istream&, const TString& );
0065 void BuildTransformationFromVarInfo( const std::vector<TMVA::VariableInfo>& var );
0066
0067 virtual void AttachXMLTo(void* parent);
0068 virtual void ReadFromXML( void* trfnode );
0069
0070 virtual void PrintTransformation( std::ostream & o );
0071
0072
0073 virtual void MakeFunction( std::ostream& fout, const TString& fncName, Int_t part, UInt_t trCounter, Int_t cls );
0074
0075
0076 std::vector<TString>* GetTransformationStrings( Int_t cls ) const;
0077
0078 private:
0079
0080 void CalcNormalizationParams( const std::vector< Event*>& events);
0081
0082
0083
0084 VectorOfFloatVectors fMin;
0085 VectorOfFloatVectors fMax;
0086
0087 ClassDef(VariableNormalizeTransform,0);
0088 };
0089
0090 }
0091
0092 #endif