ROOT
6.07/01
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
tmva
tmva
inc
TMVA
RegressionVariance.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 : RegressionVariance *
8
* Web : http://tmva.sourceforge.net *
9
* *
10
* Description: Calculate the separation critiera useded in regression *
11
* *
12
* There are two things: the Separation Index, and the Separation Gain *
13
* Separation Index: *
14
* Measure of the "Variance" of a sample. *
15
* *
16
* Separation Gain: *
17
* the measure of how the quality of separation of the sample increases *
18
* by splitting the sample e.g. into a "left-node" and a "right-node" *
19
* (N * Index_parent) - (N_left * Index_left) - (N_right * Index_right) *
20
* this is then the quality crition which is optimized for when trying *
21
* to increase the information in the system (making the best selection *
22
* *
23
* *
24
* Authors (alphabetical): *
25
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, Germany *
26
* *
27
* Copyright (c) 2005: *
28
* CERN, Switzerland *
29
* U. of Victoria, Canada *
30
* Heidelberg U., Germany *
31
* *
32
* Redistribution and use in source and binary forms, with or without *
33
* modification, are permitted according to the terms listed in LICENSE *
34
* (http://tmva.sourceforge.net/LICENSE) *
35
**********************************************************************************/
36
37
#ifndef ROOT_TMVA_RegressionVariance
38
#define ROOT_TMVA_RegressionVariance
39
40
//////////////////////////////////////////////////////////////////////////
41
// //
42
// RegressionVariance //
43
// //
44
// Calculate the "SeparationGain" for Regression analysis //
45
// separation critiera used in various training algorithms //
46
// //
47
// There are two things: the Separation Index, and the Separation Gain //
48
// Separation Index: //
49
// Measure of the "Variance" of a sample. //
50
// //
51
// Separation Gain: //
52
// the measure of how the quality of separation of the sample increases //
53
// by splitting the sample e.g. into a "left-node" and a "right-node" //
54
// (N * Index_parent) - (N_left * Index_left) - (N_right * Index_right) //
55
// this is then the quality crition which is optimized for when trying //
56
// to increase the information in the system (making the best selection //
57
// //
58
//////////////////////////////////////////////////////////////////////////
59
60
#ifndef ROOT_Rtypes
61
#include "
Rtypes.h
"
62
#endif
63
64
#ifndef ROOT_TString
65
#include "
TString.h
"
66
#endif
67
68
namespace
TMVA {
69
70
class
RegressionVariance
{
71
72
public
:
73
74
//default constructor
75
RegressionVariance
(){
fName
=
"Variance for Regression"
;}
76
77
//copy constructor
78
RegressionVariance
(
const
RegressionVariance
& s ):
fName
( s.
fName
) {}
79
80
// destructor
81
virtual
~RegressionVariance
(){}
82
83
// Return the gain in separation of the original sample is splitted in two sub-samples
84
// (N * Index_parent) - (N_left * Index_left) - (N_right * Index_right)
85
Double_t
GetSeparationGain
(
const
Double_t
&nLeft,
const
Double_t
&targetLeft,
const
Double_t
&target2Left,
86
const
Double_t
&nTot,
const
Double_t
&targetTot,
const
Double_t
&target2Tot );
87
88
// Return the separation index (a measure for "purity" of the sample")
89
virtual
Double_t
GetSeparationIndex
(
const
Double_t
&
n
,
const
Double_t
&target,
const
Double_t
&target2 );
90
91
// Return the name of the concrete Index implementation
92
TString
GetName
() {
return
fName
; }
93
94
protected
:
95
96
TString
fName
;
// name of the concrete Separation Index impementation
97
98
ClassDef
(
RegressionVariance
,0)
// Interface to different separation critiera used in training algorithms
99
};
100
101
102
}
// namespace TMVA
103
104
#endif
Rtypes.h
TMVA::RegressionVariance
Definition:
RegressionVariance.h:70
TMVA::RegressionVariance::GetSeparationGain
Double_t GetSeparationGain(const Double_t &nLeft, const Double_t &targetLeft, const Double_t &target2Left, const Double_t &nTot, const Double_t &targetTot, const Double_t &target2Tot)
TString
Basic string class.
Definition:
TString.h:137
TMVA::RegressionVariance::~RegressionVariance
virtual ~RegressionVariance()
Definition:
RegressionVariance.h:81
TMVA::RegressionVariance::GetSeparationIndex
virtual Double_t GetSeparationIndex(const Double_t &n, const Double_t &target, const Double_t &target2)
Separation Index: a simple Variance.
Definition:
RegressionVariance.cxx:72
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:254
TString.h
TMVA::RegressionVariance::fName
TString fName
Definition:
RegressionVariance.h:96
Double_t
double Double_t
Definition:
RtypesCore.h:55
TMVA::RegressionVariance::RegressionVariance
RegressionVariance()
Definition:
RegressionVariance.h:75
TMVA::RegressionVariance::GetName
TString GetName()
Definition:
RegressionVariance.h:92
TMVA::RegressionVariance::RegressionVariance
RegressionVariance(const RegressionVariance &s)
Definition:
RegressionVariance.h:78
n
const Int_t n
Definition:
legend1.C:16