ROOT
6.06/04
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
GiniIndex.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 : GiniIndex *
8
* Web : http://tmva.sourceforge.net *
9
* *
10
* Description: Implementation of the GiniIndex as separation criterion *
11
* Large Gini Indices (maximum 0.5) mean , that the sample is well *
12
* mixed (same amount of signal and bkg) *
13
* bkg. Small Indices mean, well separated. *
14
* general defniniton: *
15
* Gini(Sample M) = 1 - (c(1)/N)^2 - (c(2)/N)^2 .... - (c(k)/N)^2 *
16
* Where: M is a smaple of whatever N elements (events) *
17
* that belong to K different classes *
18
* c(k) is the number of elements that belong to class k *
19
* for just Signal and Background classes this boils down to: *
20
* Gini(Sample) = 2s*b/(s+b)^2 *
21
* *
22
* *
23
* Authors (alphabetical): *
24
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
25
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, Germany *
26
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
27
* *
28
* Copyright (c) 2005: *
29
* CERN, Switzerland *
30
* U. of Victoria, Canada *
31
* Heidelberg U., Germany *
32
* *
33
* Redistribution and use in source and binary forms, with or without *
34
* modification, are permitted according to the terms listed in LICENSE *
35
* (http://ttmva.sourceforge.net/LICENSE) *
36
**********************************************************************************/
37
38
#ifndef ROOT_TMVA_GiniIndex
39
#define ROOT_TMVA_GiniIndex
40
41
//////////////////////////////////////////////////////////////////////////
42
// //
43
// GiniIndex //
44
// //
45
// Implementation of the GiniIndex as separation criterion //
46
// //
47
// Large Gini Indices (maximum 0.5) mean , that the sample is well //
48
// mixed (same amount of signal and bkg) //
49
// bkg. Small Indices mean, well separated. //
50
// general defniniton: //
51
// Gini(Sample M) = 1 - (c(1)/N)^2 - (c(2)/N)^2 .... - (c(k)/N)^2 //
52
// Where: M is a smaple of whatever N elements (events) //
53
// that belong to K different classes //
54
// c(k) is the number of elements that belong to class k //
55
// for just Signal and Background classes this boils down to: //
56
// Gini(Sample) = 2s*b/(s+b)^2 //
57
//////////////////////////////////////////////////////////////////////////
58
59
#ifndef ROOT_TMVA_SeparationBase
60
#include "
TMVA/SeparationBase.h
"
61
#endif
62
63
namespace
TMVA
{
64
65
class
GiniIndex
:
public
SeparationBase
{
66
67
public
:
68
69
// construtor for the GiniIndex
70
GiniIndex
() {
fName
=
"Gini"
; }
71
72
// copy constructor
73
GiniIndex
(
const
GiniIndex
&
g
):
SeparationBase
(g) {}
74
75
//destructor
76
virtual
~GiniIndex
(){}
77
78
// Return the separation index (a measure for "purity" of the sample")
79
virtual
Double_t
GetSeparationIndex
(
const
Double_t
&s,
const
Double_t
&b );
80
81
protected
:
82
83
ClassDef
(
GiniIndex
,0)
// Implementation of the GiniIndex as separation criterion
84
};
85
86
}
// namespace TMVA
87
88
#endif
89
TMVA::GiniIndex::GiniIndex
GiniIndex()
Definition:
GiniIndex.h:70
TMVA::GiniIndex::GetSeparationIndex
virtual Double_t GetSeparationIndex(const Double_t &s, const Double_t &b)
Gini(Sample M) = 1 - (c(1)/N)^2 - (c(2)/N)^2 ....
Definition:
GiniIndex.cxx:58
_pythonization.g
g
Definition:
_pythonization.py:167
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:254
TMVA::GiniIndex::GiniIndex
GiniIndex(const GiniIndex &g)
Definition:
GiniIndex.h:73
SeparationBase.h
TMVA::GiniIndex
Definition:
GiniIndex.h:65
TMVA::SeparationBase
Definition:
SeparationBase.h:88
TMVA::GiniIndex::~GiniIndex
virtual ~GiniIndex()
Definition:
GiniIndex.h:76
Double_t
double Double_t
Definition:
RtypesCore.h:55
TMVA
Abstract ClassifierFactory template that handles arbitrary types.
Definition:
MethodPyAdaBoost.h:29
TMVA::SeparationBase::fName
TString fName
Definition:
SeparationBase.h:114