library: libTMVA #include "MethodLikelihood.h" |
Inheritance Chart: | |||||||||||||
|
private:
void GetSQRMats() void InitLik() public:
MethodLikelihood(TString jobName, vector<TString>* theVariables, TTree* theTree = 0, TString theOption = , TDirectory* theTargetDir = 0) MethodLikelihood(vector<TString>* theVariables, TString theWeightFile, TDirectory* theTargetDir = NULL) MethodLikelihood(const TMVA::MethodLikelihood&) virtual ~MethodLikelihood() static TClass* Class() Bool_t DecorrVarSpace() virtual Double_t GetMvaValue(TMVA::Event* e) virtual TClass* IsA() const TMVA::MethodLikelihood& operator=(const TMVA::MethodLikelihood&) 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:
TFile* fFin TMVA::PDF::SmoothMethod fSmoothMethod Int_t fNevt total number of events in sample Int_t fNsig number of signal events in sample Int_t fNbgd number of background events in sample Int_t fNsmooth naumber of smooth passes Double_t fEpsilon minimum number of likelihood (to avoid zero) TMatrixD* fSqS square-root matrix for signal TMatrixD* fSqB square-root matrix for background vector<TH1*>* fHistSig signal PDFs (histograms) vector<TH1*>* fHistBgd background PDFs (histograms) vector<TH1*>* fHistSig_smooth signal PDFs (smoothed histograms) vector<TH1*>* fHistBgd_smooth background PDFs (smoothed histograms) TList* fSigPDFHist list of PDF histograms (signal) TList* fBgdPDFHist list of PDF histograms (background) vector<PDF*>* fPDFSig list of PDFs (signal) vector<PDF*>* fPDFBgd list of PDFs (background) Int_t fNbins number of bins in reference histograms Int_t fAverageEvtPerBin average events per bin; used to calculate fNbins Bool_t fDecorrVarSpace flag for decorrelation method
_______________________________________________________________________Likelihood analysis ("non-parametric approach")
Also implemented is a "diagonalized likelihood approach", which improves over the uncorrelated likelihood ansatz by transforming linearly the input variables into a diagonal space, using the square-root of the covariance matrix
The method of maximum likelihood is the most straightforward, and
certainly among the most elegant multivariate analyser approaches.
We define the likelihood ratio, RL, for event
i, by:
Note that in TMVA the output of the likelihood ratio is transformed
by
The biggest drawback of the Likelihood approach is that it assumes
that the discriminant variables are uncorrelated. If it were the case,
it can be proven that the discrimination obtained by the above likelihood
ratio is optimal, ie, no other method can beat it. However, in most
practical applications of MVAs correlations are present.
Linear correlations, measured from the training sample, can be taken
into account in a straightforward manner through the square-root
of the covariance matrix. The square-root of a matrix
C is the matrix C′ that multiplied with itself
yields C: C=C′C′. We compute the
square-root matrix (SQM) by means of diagonalising (D) the
covariance matrix:
The above diagonalisation is complete for linearly correlated, Gaussian distributed variables only. In real-world examples this is not often the case, so that only little additional information may be recovered by the diagonalisation procedure. In these cases, non-linear methods must be applied.
_______________________________________________________________________
standard constructor MethodLikelihood options: format and syntax of option string: "Spline2:0:25:D" where: Splinei [i=1,2,3,5] - which spline is used for smoothing the pdfs 0 - how often the input histos are smoothed 25 - average num of events per PDF bin to trigger warning D - use square-root-matrix to decorrelate variable space
construct likelihood references from file
create reference distributions (PDFs) from signal and background events: fill histograms and smooth them; if decorrelation is required, compute corresponding square-root matrices