34 #ifndef ROOT_TMVA_MethodFisher
35 #define ROOT_TMVA_MethodFisher
54 class MethodFisher :
public MethodBase {
58 MethodFisher(
const TString& jobName,
59 const TString& methodTitle,
61 const TString& theOption =
"Fisher");
63 MethodFisher( DataSetInfo& dsi,
64 const TString& theWeightFile);
66 virtual ~MethodFisher(
void );
68 virtual Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets );
74 using MethodBase::ReadWeightsFromStream;
77 void AddWeightsXMLTo (
void* parent )
const;
80 void ReadWeightsFromStream( std::istream & i );
81 void ReadWeightsFromXML (
void* wghtnode );
84 Double_t GetMvaValue( Double_t* err = 0, Double_t* errUpper = 0 );
86 enum EFisherMethod { kFisher, kMahalanobis };
87 EFisherMethod GetFisherMethod(
void ) {
return fFisherMethod; }
90 const Ranking* CreateRanking();
93 void PrintCoefficients(
void );
99 void MakeClassSpecific( std::ostream&,
const TString& )
const;
102 void GetHelpMessage()
const;
107 void DeclareOptions();
108 void ProcessOptions();
111 void InitMatrices(
void );
114 void GetMean(
void );
117 void GetCov_WithinClass(
void );
120 void GetCov_BetweenClass(
void );
123 void GetCov_Full(
void );
126 void GetDiscrimPower(
void );
129 void GetFisherCoeff(
void );
136 EFisherMethod fFisherMethod;
144 Double_t fSumOfWeightsS;
145 Double_t fSumOfWeightsB;
147 std::vector<Double_t>* fDiscrimPow;
148 std::vector<Double_t>* fFisherCoeff;
154 ClassDef(MethodFisher,0);
159 #endif // MethodFisher_H