ROOT
git-r3/HEAD
Reference Guide
Loading...
Searching...
No Matches
SeparationBase.h
Go to the documentation of this file.
1
// @(#)root/tmva $Id$
2
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
3
4
/**********************************************************************************
5
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6
* Package: TMVA *
7
* Class : SeparationBase *
8
* *
9
* *
10
* Description: An interface to different separation criteria used in various *
11
* training algorithms, as there are: *
12
* Gini-Index, Cross Entropy, Misclassification Error, e.t.c. *
13
* *
14
* There are two things: the Separation Index, and the Separation Gain *
15
* Separation Index: *
16
* Measure of the "purity" of a sample. If all elements (events) in the *
17
* sample belong to the same class (e.g. signal or backgr), than the *
18
* separation index is 0 (meaning 100% purity (or 0% purity as it is *
19
* symmetric. The index becomes maximal, for perfectly mixed samples *
20
* eg. purity=50% , N_signal = N_bkg *
21
* *
22
* Separation Gain: *
23
* the measure of how the quality of separation of the sample increases *
24
* by splitting the sample e.g. into a "left-node" and a "right-node" *
25
* (N * Index_parent) - (N_left * Index_left) - (N_right * Index_right) *
26
* this is then the quality criterion which is optimized for when trying *
27
* to increase the information in the system (making the best selection *
28
* *
29
* *
30
* Authors (alphabetical): *
31
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
32
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, Germany *
33
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
34
* *
35
* Copyright (c) 2005: *
36
* CERN, Switzerland *
37
* U. of Victoria, Canada *
38
* Heidelberg U., Germany *
39
* *
40
* Redistribution and use in source and binary forms, with or without *
41
* modification, are permitted according to the terms listed in LICENSE *
42
* (see tmva/doc/LICENSE) *
43
**********************************************************************************/
44
45
#ifndef ROOT_TMVA_SeparationBase
46
#define ROOT_TMVA_SeparationBase
47
48
//////////////////////////////////////////////////////////////////////////
49
// //
50
// SeparationBase //
51
// //
52
// An interface to calculate the "SeparationGain" for different //
53
// separation criteria used in various training algorithms //
54
// //
55
// There are two things: the Separation Index, and the Separation Gain //
56
// Separation Index: //
57
// Measure of the "purity" of a sample. If all elements (events) in the //
58
// sample belong to the same class (e.g. signal or background), than the//
59
// separation index is 0 (meaning 100% purity (or 0% purity as it is //
60
// symmetric. The index becomes maximal, for perfectly mixed samples //
61
// eg. purity=50% , N_signal = N_bkg //
62
// //
63
// Separation Gain: //
64
// the measure of how the quality of separation of the sample increases //
65
// by splitting the sample e.g. into a "left-node" and a "right-node" //
66
// (N * Index_parent) - (N_left * Index_left) - (N_right * Index_right) //
67
// this is then the quality criterion which is optimized for when trying//
68
// to increase the information in the system (making the best selection //
69
// //
70
//////////////////////////////////////////////////////////////////////////
71
72
#include "
Rtypes.h
"
73
74
#include "
TString.h
"
75
76
#include "
TMath.h
"
77
78
#include <limits>
79
80
namespace
TMVA
{
81
82
class
SeparationBase
{
83
84
public
:
85
86
// default constructor
87
SeparationBase
();
88
89
//copy constructor
90
SeparationBase
(
const
SeparationBase
& s );
91
92
// destructor
93
virtual
~SeparationBase
(){}
94
95
// Return the gain in separation of the original sample is split in two sub-samples
96
// (N * Index_parent) - (N_left * Index_left) - (N_right * Index_right)
97
virtual
Double_t
GetSeparationGain
(
const
Double_t
nSelS,
const
Double_t
nSelB,
98
const
Double_t
nTotS,
const
Double_t
nTotB );
99
100
// Return the separation index (a measure for "purity" of the sample")
101
virtual
Double_t
GetSeparationIndex
(
const
Double_t
s,
const
Double_t
b
) = 0;
102
103
// Return the name of the concrete Index implementation
104
const
TString
&
GetName
() {
return
fName
; }
105
106
protected
:
107
108
TString
fName
;
// name of the concrete Separation Index implementation
109
110
Double_t
fPrecisionCut
;
111
112
ClassDef
(
SeparationBase
,0);
// Interface to different separation criteria used in training algorithms
113
};
114
115
116
}
// namespace TMVA
117
118
#endif
b
#define b(i)
Definition
RSha256.hxx:100
Double_t
double Double_t
Double 8 bytes.
Definition
RtypesCore.h:73
Rtypes.h
ClassDef
#define ClassDef(name, id)
Definition
Rtypes.h:344
TMath.h
TString.h
TMVA::SeparationBase::GetSeparationGain
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 th...
Definition
SeparationBase.cxx:100
TMVA::SeparationBase::~SeparationBase
virtual ~SeparationBase()
Definition
SeparationBase.h:93
TMVA::SeparationBase::GetName
const TString & GetName()
Definition
SeparationBase.h:104
TMVA::SeparationBase::fPrecisionCut
Double_t fPrecisionCut
Definition
SeparationBase.h:110
TMVA::SeparationBase::GetSeparationIndex
virtual Double_t GetSeparationIndex(const Double_t s, const Double_t b)=0
TMVA::SeparationBase::fName
TString fName
Definition
SeparationBase.h:108
TMVA::SeparationBase::SeparationBase
SeparationBase()
Constructor.
Definition
SeparationBase.cxx:75
TString
Basic string class.
Definition
TString.h:138
TMVA
create variable transformations
Definition
GeneticMinimizer.h:22
tmva
tmva
inc
TMVA
SeparationBase.h
ROOTgit-r3/HEAD - Reference Guide Generated on
(GVA Time) using Doxygen 1.16.1