library: libTMVA
#include "MethodFisher.h"

TMVA::MethodFisher


class description - header file - source file
viewCVS header - viewCVS source

class TMVA::MethodFisher: public TMVA::MethodBase

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
public:
virtual~MethodFisher()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual const TMVA::Ranking*CreateRanking()
TMVA::DataSet&TMVA::MethodBase::Data() const
virtual voidTObject::Delete(Option_t* option = "")
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() const
virtual TObject*TObject::DrawClone(Option_t* option = "") const
virtual voidTObject::Dump() const
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Double_tTMVA::MethodBase::GetEffForRoot(Double_t)
virtual Double_tTMVA::MethodBase::GetEfficiency(TString, TTree*)
Double_tTMVA::MethodBase::GetEventVal(Int_t ivar) const
Double_tTMVA::MethodBase::GetEventValNormalized(Int_t ivar) const
Double_tTMVA::MethodBase::GetEventWeight() const
virtual TMVA::MethodFisher::EFisherMethodGetFisherMethod()
virtual const char*TObject::GetIconName() const
const TString&TMVA::MethodBase::GetInputExp(int i) const
const TString&TMVA::MethodBase::GetInputVar(int i) const
virtual const TString&TMVA::MethodBase::GetJobName() const
virtual const TString&TMVA::MethodBase::GetMethodName() const
virtual const TString&TMVA::MethodBase::GetMethodTitle() const
virtual const TMVA::Types::EMVATMVA::MethodBase::GetMethodType() const
virtual Double_tTMVA::MethodBase::GetmuTransform(TTree*)
virtual Double_tGetMvaValue()
virtual const char*TMVA::MethodBase::GetName() const
Int_tTMVA::MethodBase::GetNvar() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Double_tTMVA::MethodBase::GetOptimalSignificance(Double_t SignalEvents, Double_t BackgroundEvents, Double_t& optimal_significance_value) const
virtual Option_t*TObject::GetOption() const
TStringTMVA::MethodBase::GetOptions() const
virtual TMVA::Types::EPreprocessingMethodTMVA::MethodBase::GetPreprocessingMethod() const
virtual Double_tTMVA::MethodBase::GetSeparation()
virtual Double_tTMVA::MethodBase::GetSignificance()
TTree*TMVA::MethodBase::GetTestTree() const
static TMVA::MethodBase*TMVA::MethodBase::GetThisBase()
virtual const char*TObject::GetTitle() const
virtual Double_tTMVA::MethodBase::GetTrainingEfficiency(TString)
TTree*TMVA::MethodBase::GetTrainingTree() const
virtual UInt_tTObject::GetUniqueID() const
virtual TStringTMVA::MethodBase::GetWeightFileDir() const
virtual TStringTMVA::MethodBase::GetWeightFileExtension() const
TStringTMVA::MethodBase::GetWeightFileName() const
TMVA::MethodBase::EWeightFileTypeTMVA::MethodBase::GetWeightFileType() const
Double_tTMVA::MethodBase::GetXmax(Int_t ivar, TMVA::Types::EPreprocessingMethod corr = Types::kNone) const
Double_tTMVA::MethodBase::GetXmax(const TString& var, TMVA::Types::EPreprocessingMethod corr = Types::kNone) const
Double_tTMVA::MethodBase::GetXmin(Int_t ivar, TMVA::Types::EPreprocessingMethod corr = Types::kNone) const
Double_tTMVA::MethodBase::GetXmin(const TString& var, TMVA::Types::EPreprocessingMethod corr = Types::kNone) const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
Bool_tTMVA::MethodBase::HasTrainingTree() const
static Double_tTMVA::MethodBase::IGetEffForRoot(Double_t)
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() const
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
virtual Bool_tTMVA::MethodBase::IsOK() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTMVA::MethodBase::IsSignalLike()
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
TMVA::MethodFisherMethodFisher(TMVA::DataSet& theData, TString theWeightFile, TDirectory* theTargetDir = NULL)
TMVA::MethodFisherMethodFisher(TString jobName, TString methodTitle, TMVA::DataSet& theData, TString theOption = Fisher, TDirectory* theTargetDir = 0)
Double_tTMVA::MethodBase::Norm(Int_t ivar, Double_t x) const
Double_tTMVA::MethodBase::Norm(TString var, Double_t x) const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TMVA::IMethod&TMVA::IMethod::operator=(const TMVA::IMethod&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTMVA::MethodBase::PrepareEvaluationTree(TTree* theTestTree)
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTMVA::MethodBase::ReadStateFromFile()
virtual voidTMVA::MethodBase::ReadStateFromStream(istream& i)
virtual Bool_tTMVA::MethodBase::ReadTestEvent(UInt_t ievt, TMVA::Types::ESBType type = Types::kMaxSBType)
Bool_tTMVA::MethodBase::ReadTrainingEvent(UInt_t ievt, TMVA::Types::ESBType type = Types::kMaxSBType)
virtual voidReadWeightsFromStream(istream& i)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") const
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")
static voidTObject::SetDtorOnly(void* obj)
virtual voidTMVA::MethodBase::SetJobName(TString jobName)
voidTMVA::MethodBase::SetMethodName(TString methodName)
voidTMVA::MethodBase::SetMethodTitle(TString methodTitle)
voidTMVA::MethodBase::SetMethodType(TMVA::Types::EMVA methodType)
voidTMVA::MethodBase::SetNvar(Int_t n)
static voidTObject::SetObjectStat(Bool_t stat)
voidTMVA::MethodBase::SetPreprocessingMethod(TMVA::Types::EPreprocessingMethod m)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidTMVA::MethodBase::SetVerbose(Bool_t v = kTRUE)
virtual voidTMVA::MethodBase::SetWeightFileDir(TString fileDir)
virtual voidTMVA::MethodBase::SetWeightFileExtension(TString fileExtension)
voidTMVA::MethodBase::SetWeightFileName(TString)
voidTMVA::MethodBase::SetWeightFileType(TMVA::MethodBase::EWeightFileType w)
voidTMVA::MethodBase::SetXmax(Int_t ivar, Double_t x, TMVA::Types::EPreprocessingMethod corr = Types::kNone)
voidTMVA::MethodBase::SetXmax(const TString& var, Double_t x, TMVA::Types::EPreprocessingMethod corr = Types::kNone)
voidTMVA::MethodBase::SetXmin(Int_t ivar, Double_t x, TMVA::Types::EPreprocessingMethod corr = Types::kNone)
voidTMVA::MethodBase::SetXmin(const TString& var, Double_t x, TMVA::Types::EPreprocessingMethod corr = Types::kNone)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
virtual voidTMVA::MethodBase::Test(TTree* theTestTree = 0)
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTMVA::MethodBase::TestInit(TTree* theTestTree = 0)
virtual voidTrain()
voidTMVA::MethodBase::TrainMethod()
virtual voidTObject::UseCurrentStyle()
Bool_tTMVA::MethodBase::Verbose() const
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) const
virtual voidTMVA::MethodBase::WriteEvaluationHistosToFile(TDirectory* targetDir)
virtual voidTMVA::MethodBase::WriteMonitoringHistosToFile() const
voidTMVA::MethodBase::WriteStateToFile() const
virtual voidTMVA::MethodBase::WriteStateToStream(ostream& o) const
virtual voidWriteWeightsToStream(ostream& o) const
protected:
TDirectory*TMVA::MethodBase::BaseDir() const
Bool_tTMVA::MethodBase::CheckSanity(TTree* theTree = 0)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTMVA::MethodBase::EnableLooseOptions(Bool_t b = kTRUE)
TMVA::MethodBase::ECutOrientationTMVA::MethodBase::GetCutOrientation() const
TMVA::Types::ESBTypeTMVA::MethodBase::GetPreprocessingType() const
Double_tTMVA::MethodBase::GetSignalReferenceCut() const
const TString&TMVA::MethodBase::GetTestvarName() const
const TString&TMVA::MethodBase::GetTestvarPrefix() const
const TList&TMVA::MethodBase::ListOfOptions() const
TDirectory*TMVA::MethodBase::LocalTDir() const
voidTObject::MakeZombie()
voidTMVA::MethodBase::ParseOptions(Bool_t verbose = kTRUE)
voidTMVA::MethodBase::PrintOptions() const
voidTMVA::MethodBase::ReadOptionsFromStream(istream& istr)
voidTMVA::MethodBase::ResetThisBase()
voidTMVA::MethodBase::SetPreprocessingType(TMVA::Types::ESBType t)
voidTMVA::MethodBase::SetSignalReferenceCut(Double_t cut)
voidTMVA::MethodBase::SetTestvarName()
voidTMVA::MethodBase::SetTestvarName(TString v)
voidTMVA::MethodBase::SetTestvarPrefix(TString prefix)
voidTMVA::MethodBase::Statistics(TMVA::Types::ETreeType treeType, const TString& theVarName, Double_t&, Double_t&, Double_t&, Double_t&, Double_t&, Double_t&, Bool_t norm = kFALSE)
voidTMVA::MethodBase::WriteOptionsToStream(ostream& o) const
private:
virtual voidDeclareOptions()
voidGetCov_BetweenClass()
voidGetCov_Full()
voidGetCov_WithinClass()
voidGetDiscrimPower()
voidGetFisherCoeff()
voidGetMean()
voidInitFisher()
voidInitMatrices()
voidPrintCoefficients()
virtual voidProcessOptions()

Data Members

public:
enum EFisherMethod { kFisher
kMahalanobis
};
enum TMVA::MethodBase::EWeightFileType { kROOT
kTEXT
};
enum TMVA::MethodBase::ECutOrientation { kNegative
kPositive
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
TMVA::Ranking*TMVA::MethodBase::fRankingranking
vector<TString>*TMVA::MethodBase::fInputVarsvector of input variables used in MVA
Bool_tTMVA::MethodBase::fIsOKstatus of sanity checks
TH1*TMVA::MethodBase::fHistS_plotbinMVA plots used for graphics representation (signal)
TH1*TMVA::MethodBase::fHistB_plotbinMVA plots used for graphics representation (background)
TH1*TMVA::MethodBase::fHistS_highbinMVA plots used for efficiency calculations (signal)
TH1*TMVA::MethodBase::fHistB_highbinMVA plots used for efficiency calculations (background)
TH1*TMVA::MethodBase::fEffSefficiency plot (signal)
TH1*TMVA::MethodBase::fEffBefficiency plot (background)
TH1*TMVA::MethodBase::fEffBvsSbackground efficiency versus signal efficiency
TH1*TMVA::MethodBase::fRejBvsSbackground rejection (=1-eff.) versus signal efficiency
TH1*TMVA::MethodBase::fHistBhatSworking histograms needed for mu-transform (signal)
TH1*TMVA::MethodBase::fHistBhatBworking histograms needed for mu-transform (background)
TH1*TMVA::MethodBase::fHistMuSmu-transform (signal)
TH1*TMVA::MethodBase::fHistMuBmu-transform (background)
TH1*TMVA::MethodBase::fTrainEffSTraining efficiency plot (signal)
TH1*TMVA::MethodBase::fTrainEffBTraining efficiency plot (background)
TH1*TMVA::MethodBase::fTrainEffBvsSTraining background efficiency versus signal efficiency
TH1*TMVA::MethodBase::fTrainRejBvsSTraining background rejection (=1-eff.) versus signal efficiency
Double_tTMVA::MethodBase::fX
Double_tTMVA::MethodBase::fMode
TGraph*TMVA::MethodBase::fGraphSgraphs used for splines for efficiency (signal)
TGraph*TMVA::MethodBase::fGraphBgraphs used for splines for efficiency (background)
TGraph*TMVA::MethodBase::fGrapheffBvsSgraphs used for splines for signal eff. versus background eff.
TMVA::PDF*TMVA::MethodBase::fSplSPDFs of MVA distribution (signal)
TMVA::PDF*TMVA::MethodBase::fSplBPDFs of MVA distribution (background)
TSpline*TMVA::MethodBase::fSpleffBvsSsplines for signal eff. versus background eff.
TGraph*TMVA::MethodBase::fGraphTrainSgraphs used for splines for training efficiency (signal)
TGraph*TMVA::MethodBase::fGraphTrainBgraphs used for splines for training efficiency (background)
TGraph*TMVA::MethodBase::fGraphTrainEffBvsSgraphs used for splines for training signal eff. versus background eff.
TMVA::PDF*TMVA::MethodBase::fSplTrainSPDFs of training MVA distribution (signal)
TMVA::PDF*TMVA::MethodBase::fSplTrainBPDFs of training MVA distribution (background)
TSpline*TMVA::MethodBase::fSplTrainEffBvsSsplines for training signal eff. versus background eff.
Int_tTMVA::MethodBase::fNbinsnumber of bins in representative histograms
Int_tTMVA::MethodBase::fNbinsHnumber of bins in evaluation histograms
TMVA::MethodBase::ECutOrientationTMVA::MethodBase::fCutOrientation+1 if Sig>Bkg, -1 otherwise
TMVA::TSpline1*TMVA::MethodBase::fSplRefShelper splines for RootFinder (signal)
TMVA::TSpline1*TMVA::MethodBase::fSplRefBhelper splines for RootFinder (background)
TMVA::TSpline1*TMVA::MethodBase::fSplTrainRefShelper splines for RootFinder (signal)
TMVA::TSpline1*TMVA::MethodBase::fSplTrainRefBhelper splines for RootFinder (background)
TMVA::OptionBase*TMVA::MethodBase::fLastDeclaredOptionlast declared option
TListTMVA::MethodBase::fListOfOptionsoption list
TMVA::MsgLoggerTMVA::MethodBase::fLoggermessage logger
private:
TStringfTheMethod
TMatrixD*fMeanMatx
TMatrixD*fBetwbetween-class matrix
TMatrixD*fWithwithin-class matrix
TMatrixD*fCovfull covariance matrix
vector<Double_t>*fDiscrimPow
vector<Double_t>*fFisherCoeff
Double_tfF0
TMVA::MethodFisher::EFisherMethodfFisherMethod

Class Description

 
/* 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, xi, for each input variable, i, class-specific sample means, xS(B),i, and total covariance matrix Tij. The covariance matrix can be decomposed into the sum of a within- (Wij) and a between-class (Bij) class matrix. They describe the dispersion of events relative to the means of their own class (within-class matrix), and relative to the overall sample means (between-class matrix). The Fisher coefficients, Fi, are then given by

where in TMVA is set NS=NB, so that the factor in front of the sum simplifies to ½. The Fisher discriminant then reads
The offset F0 centers the sample mean of xFi at zero. Instead of using the within-class matrix, the Mahalanobis variant determines the Fisher coefficients as follows:
with resulting xMa that are very similar to the xFi.

TMVA provides two outputs for the ranking of the input variables:

The corresponding numbers are printed on standard output. */
_______________________________________________________________________
MethodFisher( TString jobName, TString methodTitle, DataSet& theData, TString theOption, TDirectory* theTargetDir )
 standard constructor for the "Fisher" 
MethodFisher( DataSet& theData, TString theWeightFile, TDirectory* theTargetDir )
 constructor to calculate the Fisher-MVA from previously generatad 
 coefficients (weight file)
void InitFisher( void )
 default initialisation called by all constructors
void DeclareOptions()
 MethodFisher options:
 format and syntax of option string: "type"
 where type is "Fisher" or "Mahalanobis"

void ProcessOptions()
 process user options
~MethodFisher( void )
 destructor
void Train( void )
 computation of Fisher coefficients by series of matrix operations
Double_t GetMvaValue()
 returns the Fisher value (no fixed range)
void InitMatrices( void )
 initialisaton method; creates global matrices and vectors
 should never be called without existing trainingTree
void GetMean( void )
 compute mean values of variables in each sample, and the overall means
void GetCov_WithinClass( void )
 the matrix of covariance 'within class' reflects the dispersion of the
 events relative to the center of gravity of their own class  
void GetCov_BetweenClass( void )
 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
void GetCov_Full( void )
 compute full covariance matrix from sum of within and between matrices
void GetFisherCoeff( void )
 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
void GetDiscrimPower( void )
 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"
const TMVA::Ranking* CreateRanking()
 computes ranking of input variables
void PrintCoefficients( void )
 display Fisher coefficients and discriminating power for each variable
 check maximum length of variable name
void WriteWeightsToStream( ostream& o )
 save the weights
void ReadWeightsFromStream( istream& istr )
 read Fisher coefficients from weight file
EFisherMethod GetFisherMethod( void )
{ return fFisherMethod; }

Author: Andreas Hoecker, Xavier Prudent, Joerg Stelzer, Helge Voss, Kai Voss
Last update: root/tmva $Id: MethodFisher.cxx,v 1.11 2006/11/20 15:35:28 brun Exp $
Copyright (c) 2005: *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.