library: libTMVA
#include "MethodLikelihood.h"

TMVA::MethodLikelihood


class description - header file - source file - inheritance tree (.pdf)

class TMVA::MethodLikelihood : public TMVA::MethodBase

Inheritance Chart:
TObject
<-
TMVA::MethodBase
<-
TMVA::MethodLikelihood
    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()

Data Members

    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

Class Description

_______________________________________________________________________
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:

Here the signal and background likelihoods, LS, LB, are products of the corresponding probability densities, pS, pB, of the Nvar discriminating variables used in the MVA:
and accordingly for LB. In practise, TMVA uses polynomial splines to estimate the probability density functions (PDF) obtained from the distributions of the training variables.

Note that in TMVA the output of the likelihood ratio is transformed by

to avoid the occurrence of heavy peaks at RL=0,1. Decorrelated (or "diagonalized") Likelihood

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:

and the linear transformation of the linearly correlated into the uncorrelated variables space is then given by multiplying the measured variable tuple by the inverse of the SQM. Note that these transformations are performed for both signal and background separately, since the correlation pattern is not the same in the two samples.

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.

_______________________________________________________________________
MethodLikelihood( TString jobName, vector<TString>* theVariables, TTree* theTree, TString theOption, TDirectory* theTargetDir )
 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

MethodLikelihood( vector<TString> *theVariables, TString theWeightFile, TDirectory* theTargetDir )
 construct likelihood references from file
void InitLik( void )
 default initialisation called by all constructors
~MethodLikelihood( void )
 destructor
void Train( void )
 create reference distributions (PDFs) from signal and background events:
 fill histograms and smooth them; if decorrelation is required, compute
 corresponding square-root matrices
Double_t GetMvaValue( TMVA::Event *e )
 returns the likelihood estimator for signal
void GetSQRMats( void )
 compute square-root matrices for signal and background
void WriteWeightsToFile( void )
 write reference PDFs to file
void ReadWeightsFromFile( void )
 read reference PDFs from file
void WriteHistosToFile( void )
 write histograms and PDFs to file for monitoring purposes
MethodLikelihood( TString jobName, vector<TString>* theVariables, TTree* theTree = 0, TString theOption = "", TDirectory* theTargetDir = 0 )
Bool_t DecorrVarSpace( void )
 additional accessor

Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
Last update: root/tmva $Id: MethodLikelihood.cxx,v 1.4 2006/05/23 19:35:06 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.