library: libTMVA #include "MethodFisher.h" |
Inheritance Chart: | |||||||||||||
|
private:
void GetCov_BetweenClass() void GetCov_Full() void GetCov_WithinClass() void GetDiscrimPower() void GetFisherCoeff() void GetMean() void Init() void InitFisher() void PrintCoefficients() public:
MethodFisher(TString jobName, vector<TString>* theVariables, TTree* theTree = 0, TString theOption = Fisher, TDirectory* theTargetDir = 0) MethodFisher(vector<TString>* theVariables, TString theWeightFile, TDirectory* theTargetDir = NULL) MethodFisher(const TMVA::MethodFisher&) virtual ~MethodFisher() static TClass* Class() virtual TMVA::MethodFisher::FisherMethod GetMethod() virtual Double_t GetMvaValue(TMVA::Event* e) virtual TClass* IsA() const TMVA::MethodFisher& operator=(const TMVA::MethodFisher&) virtual void ReadWeightsFromFile() virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) virtual void Train() virtual void WriteHistosToFile() virtual void WriteWeightsToFile()
private:
Int_t fNevt total number of events Int_t fNsig number of signal events Int_t fNbgd number of background events TMatrixF* fSig variables for signal TMatrixF* fBgd variables for background TMatrixD* fMeanMatx TMatrixD* fBetw between-class matrix TMatrixD* fWith within-class matrix TMatrixD* fCov full covariance matrix vector<Double_t>* fDiscrimPow vector<Double_t>* fFisherCoeff Double_t fF0 TMVA::MethodFisher::FisherMethod fFisherMethod public:
static const TMVA::MethodFisher::FisherMethod kFisher static const TMVA::MethodFisher::FisherMethod kMahalanobis
_______________________________________________________________________Fisher and Mahalanobis Discriminants (Linear Discriminant Analysis)
In the method of Fisher discriminants event selection is performed
in a transformed variable space with zero linear correlations, by
distinguishing the mean values of the signal and background
distributions.
The linear discriminant analysis determines an axis in the (correlated) hyperspace of the input variables such that, when projecting the output classes (signal and background) upon this axis, they are pushed as far as possible away from each other, while events of a same class are confined in a close vicinity. The linearity property of this method is reflected in the metric with which "far apart" and "close vicinity" are determined: the covariance matrix of the discriminant variable space.
The classification of the events in signal and background classes
relies on the following characteristics (only): overall sample means,
_______________________________________________________________________
standard constructor for the "boosted decision trees" MethodFisher options: format and syntax of option string: "type" where type is "Fisher" or "Mahalanobis"
constructor to calculate the Fisher-MVA from previously generatad coefficients (weight file)
initialisaton method; creates global matrices and vectors should never be called without existing trainingTree
the matrix of covariance 'within class' reflects the dispersion of the events relative to the center of gravity of their own class
the matrix of covariance 'between class' reflects the dispersion of the events of a class relative to the global center of gravity of all the class hence the separation between classes
Fisher = Sum { [coeff]*[variables] } let Xs be the array of the mean values of variables for signal evts let Xb be the array of the mean values of variables for backgd evts let InvWith be the inverse matrix of the 'within class' correlation matrix then the array of Fisher coefficients is [coeff] =sqrt(fNsig*fNbgd)/fNevt*transpose{Xs-Xb}*InvWith
computation of discrimination power indicator for each variable small values of "fWith" indicates little compactness of sig & of backgd big values of "fBetw" indicates large separation between sig & backgd we want signal & backgd classes as compact and separated as possible the discriminating power is then defined as the ration "fBetw/fWith"
display Fisher coefficients and discriminating power for each variable check maximum length of variable name
write special monitoring histograms to file - not implemented for Fisher