Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TMVA::GiniIndex Class Reference

Implementation of the GiniIndex as separation criterion.

Large Gini Indices (maximum 0.5) mean , that the sample is well mixed (same amount of signal and bkg) bkg.

Small Indices mean, well separated.

General definition:

\[Gini(Sample M) = 1 - (\frac{c(1)}{N})^2 - (\frac{c(2)}{N})^2 .... - (\frac{c(k)}{N})^2 \]

Where:

\( M \) is a sample of whatever \( N \) elements (events) that belong to \( K \) different classes.

\( c(k) \) is the number of elements that belong to class \( k \) for just Signal and Background classes this boils down to:

\[Gini(Sample) = \frac{2sb}{(s+b)^2} \]

Definition at line 63 of file GiniIndex.h.

Public Member Functions

 GiniIndex ()
 GiniIndex (const GiniIndex &g)
virtual ~GiniIndex ()
const TStringGetName ()
virtual Double_t GetSeparationGain (const Double_t nSelS, const Double_t nSelB, const Double_t nTotS, const Double_t nTotB)
 Separation Gain: the measure of how the quality of separation of the sample increases by splitting the sample e.g.
Double_t GetSeparationIndex (const Double_t s, const Double_t b) override
 what we use here is 2*Gini.
TClassIsA () const override
void Streamer (TBuffer &) override
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)

Static Public Member Functions

static TClassClass ()
static const char * Class_Name ()
static constexpr Version_t Class_Version ()
static const char * DeclFileName ()

Protected Attributes

TString fName
Double_t fPrecisionCut

#include <TMVA/GiniIndex.h>

Inheritance diagram for TMVA::GiniIndex:
TMVA::SeparationBase

Constructor & Destructor Documentation

◆ GiniIndex() [1/2]

TMVA::GiniIndex::GiniIndex ( )
inline

Definition at line 68 of file GiniIndex.h.

◆ GiniIndex() [2/2]

TMVA::GiniIndex::GiniIndex ( const GiniIndex & g)
inline

Definition at line 71 of file GiniIndex.h.

◆ ~GiniIndex()

virtual TMVA::GiniIndex::~GiniIndex ( )
inlinevirtual

Definition at line 74 of file GiniIndex.h.

Member Function Documentation

◆ Class()

TClass * TMVA::GiniIndex::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

const char * TMVA::GiniIndex::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

constexpr Version_t TMVA::GiniIndex::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 81 of file GiniIndex.h.

◆ DeclFileName()

const char * TMVA::GiniIndex::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 81 of file GiniIndex.h.

◆ GetName()

const TString & TMVA::SeparationBase::GetName ( )
inlineinherited

Definition at line 104 of file SeparationBase.h.

◆ GetSeparationGain()

Double_t TMVA::SeparationBase::GetSeparationGain ( const Double_t nSelS,
const Double_t nSelB,
const Double_t nTotS,
const Double_t nTotB )
virtualinherited

Separation Gain: the measure of how the quality of separation of the sample increases by splitting the sample e.g.

into a "left-node" and a "right-node" (N * Index_parent) - (N_left * Index_left) - (N_right * Index_right) this is then the quality criterion which is optimized for when trying to increase the information in the system (making the best selection

Reimplemented in TMVA::SdivSqrtSplusB.

Definition at line 100 of file SeparationBase.cxx.

◆ GetSeparationIndex()

Double_t TMVA::GiniIndex::GetSeparationIndex ( const Double_t s,
const Double_t b )
overridevirtual

what we use here is 2*Gini.

. as for the later use the factor 2 is irrelevant and hence I'd like to save this calculation

Implements TMVA::SeparationBase.

Definition at line 75 of file GiniIndex.cxx.

◆ IsA()

TClass * TMVA::GiniIndex::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from TMVA::SeparationBase.

Definition at line 81 of file GiniIndex.h.

◆ Streamer()

void TMVA::GiniIndex::Streamer ( TBuffer & )
overridevirtual

Reimplemented from TMVA::SeparationBase.

◆ StreamerNVirtual()

void TMVA::GiniIndex::StreamerNVirtual ( TBuffer & ClassDef_StreamerNVirtual_b)
inline

Definition at line 81 of file GiniIndex.h.

Member Data Documentation

◆ fName

TString TMVA::SeparationBase::fName
protectedinherited

Definition at line 108 of file SeparationBase.h.

◆ fPrecisionCut

Double_t TMVA::SeparationBase::fPrecisionCut
protectedinherited

Definition at line 110 of file SeparationBase.h.


The documentation for this class was generated from the following files: