00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef ROOT_TMVA_MethodLD
00030 #define ROOT_TMVA_MethodLD
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #include <vector>
00043
00044 #ifndef ROOT_TMVA_MethodBase
00045 #include "TMVA/MethodBase.h"
00046 #endif
00047 #ifndef ROOT_TMatrixDfwd
00048 #include "TMatrixDfwd.h"
00049 #endif
00050
00051 namespace TMVA {
00052
00053 class MethodLD : public MethodBase {
00054
00055 public:
00056
00057
00058 MethodLD( const TString& jobName,
00059 const TString& methodTitle,
00060 DataSetInfo& dsi,
00061 const TString& theOption = "LD",
00062 TDirectory* theTargetDir = 0 );
00063
00064
00065 MethodLD( DataSetInfo& dsi,
00066 const TString& theWeightFile,
00067 TDirectory* theTargetDir = 0 );
00068
00069
00070 virtual ~MethodLD( void );
00071
00072 Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets );
00073
00074
00075 void Train( void );
00076
00077
00078 Double_t GetMvaValue( Double_t* err = 0, Double_t* errUpper = 0 );
00079
00080
00081 virtual const std::vector<Float_t>& GetRegressionValues();
00082
00083 using MethodBase::ReadWeightsFromStream;
00084
00085 void AddWeightsXMLTo ( void* parent ) const;
00086
00087 void ReadWeightsFromStream( std::istream & i );
00088 void ReadWeightsFromXML ( void* wghtnode );
00089
00090 const Ranking* CreateRanking();
00091 void DeclareOptions();
00092 void ProcessOptions();
00093
00094 protected:
00095
00096 void MakeClassSpecific( std::ostream&, const TString& ) const;
00097 void GetHelpMessage() const;
00098
00099 private:
00100
00101 Int_t fNRegOut;
00102
00103 TMatrixD *fSumMatx;
00104 TMatrixD *fSumValMatx;
00105 TMatrixD *fCoeffMatx;
00106 std::vector< std::vector<Double_t>* > *fLDCoeff;
00107
00108
00109 void Init( void );
00110
00111
00112 void InitMatrices( void );
00113
00114
00115 void GetSum( void );
00116
00117
00118 void GetSumVal( void );
00119
00120
00121 void GetLDCoeff( void );
00122
00123
00124 void PrintCoefficients( void );
00125
00126 ClassDef(MethodLD,0)
00127 };
00128 }
00129
00130 #endif // MethodLD_H