ROOT
6.06/09
Reference Guide
ROOT Home Page
Main Page
Related Pages
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
tmva
tmva
inc
TMVA
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
* Web : http://tmva.sourceforge.net *
9
* *
10
* Description: An interface to different separation critiera useded 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 crition 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
* (http://tmva.sourceforge.net/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 critiera 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 backgr), 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 crition which is optimized for when trying //
68
// to increase the information in the system (making the best selection //
69
// //
70
//////////////////////////////////////////////////////////////////////////
71
72
#ifndef ROOT_Rtypes
73
#include "
Rtypes.h
"
74
#endif
75
76
#ifndef ROOT_TString
77
#include "
TString.h
"
78
#endif
79
80
#ifndef ROOT_TMath
81
#include "
TMath.h
"
82
#endif
83
84
#include <limits>
85
86
namespace
TMVA
{
87
88
class
SeparationBase
{
89
90
public
:
91
92
// default constructor
93
SeparationBase
();
94
95
//copy constructor
96
SeparationBase
(
const
SeparationBase
& s );
97
98
// destructor
99
virtual
~SeparationBase
(){}
100
101
// Return the gain in separation of the original sample is splitted in two sub-samples
102
// (N * Index_parent) - (N_left * Index_left) - (N_right * Index_right)
103
virtual
Double_t
GetSeparationGain
(
const
Double_t
& nSelS,
const
Double_t
& nSelB,
104
const
Double_t
& nTotS,
const
Double_t
& nTotB );
105
106
// Return the separation index (a measure for "purity" of the sample")
107
virtual
Double_t
GetSeparationIndex
(
const
Double_t
&s,
const
Double_t
&b ) = 0;
108
109
// Return the name of the concrete Index implementation
110
const
TString
&
GetName
() {
return
fName
; }
111
112
protected
:
113
114
TString
fName
;
// name of the concrete Separation Index impementation
115
116
Double_t
fPrecisionCut
;
117
118
ClassDef
(
SeparationBase
,0)
// Interface to different separation critiera used in training algorithms
119
};
120
121
122
}
// namespace TMVA
123
124
#endif
TMVA::SeparationBase::SeparationBase
SeparationBase()
Rtypes.h
TString
Basic string class.
Definition:
TString.h:137
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:254
TString.h
TMVA::SeparationBase
Definition:
SeparationBase.h:88
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:75
TMVA::SeparationBase::fPrecisionCut
Double_t fPrecisionCut
Definition:
SeparationBase.h:116
Double_t
double Double_t
Definition:
RtypesCore.h:55
TMVA
Abstract ClassifierFactory template that handles arbitrary types.
Definition:
MethodPyAdaBoost.h:29
TMVA::SeparationBase::GetSeparationIndex
virtual Double_t GetSeparationIndex(const Double_t &s, const Double_t &b)=0
TMVA::SeparationBase::~SeparationBase
virtual ~SeparationBase()
Definition:
SeparationBase.h:99
TMVA::SeparationBase::GetName
const TString & GetName()
Definition:
SeparationBase.h:110
TMath.h
TMVA::SeparationBase::fName
TString fName
Definition:
SeparationBase.h:114