ROOT
v6-24
Reference Guide
Loading...
Searching...
No Matches
BDT.h
Go to the documentation of this file.
1
#ifndef BDT__HH
2
#define BDT__HH
3
4
#include <vector>
5
6
#include "
tmvaglob.h
"
7
8
#include "
RQ_OBJECT.h
"
9
10
#include "
TStyle.h
"
11
#include "
TPad.h
"
12
#include "
TCanvas.h
"
13
#include "
TColor.h
"
14
#include "
TPaveText.h
"
15
#include "
TControlBar.h
"
16
17
#include "
TGWindow.h
"
18
#include "
TGButton.h
"
19
#include "
TGLabel.h
"
20
#include "
TGNumberEntry.h
"
21
22
#include "
TMVA/DecisionTree.h
"
23
#include "
TMVA/Tools.h
"
24
#include "
TXMLEngine.h
"
25
26
// Uncomment this only if the link problem is solved. The include statement tends
27
// to use the ROOT classes rather than the local TMVA release
28
// #include "TMVA/DecisionTree.h"
29
// #include "TMVA/DecisionTreeNode.h"
30
namespace
TMVA
{
31
32
// this macro displays a decision tree read in from the weight file
33
34
35
inline
Int_t
getSigColorF
() {
return
TColor::GetColor
(
"#0000FF"
);}
// Pure Signal
36
inline
Int_t
getBkgColorF
() {
return
TColor::GetColor
(
"#FF0000"
);}
// Pure Backgr.
37
inline
Int_t
getIntColorF
() {
return
TColor::GetColor
(
"#33aa77"
);}
// novel green
38
39
40
inline
Int_t
getSigColorT
() {
return
10;}
41
inline
Int_t
getBkgColorT
() {
return
10;}
42
inline
Int_t
getIntColorT
() {
return
10;}
43
44
45
46
class
StatDialogBDT
{
47
48
RQ_OBJECT
(
"StatDialogBDT"
)
49
50
public
:
51
52
StatDialogBDT
(
TString
dataset,
const
TGWindow
* p,
TString
wfile,
53
TString
methName =
"BDT"
,
Int_t
itree = 0 );
54
virtual
~StatDialogBDT
() {
55
TMVA::DecisionTreeNode::SetIsTraining
(
false
);
56
fThis
= 0;
57
fMain
->
CloseWindow
();
58
fMain
->
Cleanup
();
59
if
(
gROOT
->GetListOfCanvases()->FindObject(
fCanvas
))
60
delete
fCanvas
;
61
}
62
63
// draw method
64
void
DrawTree
(
Int_t
itree );
65
66
void
RaiseDialog
() {
if
(
fMain
) {
fMain
->
RaiseWindow
();
fMain
->
Layout
();
fMain
->
MapWindow
(); } }
67
68
private
:
69
70
TGMainFrame
*
fMain
;
71
Int_t
fItree
;
72
Int_t
fNtrees
;
73
TCanvas
*
fCanvas
;
74
75
76
TGNumberEntry
*
fInput
;
77
78
TGHorizontalFrame
*
fButtons
;
79
TGTextButton
*
fDrawButton
;
80
TGTextButton
*
fCloseButton
;
81
82
void
UpdateCanvases
();
83
84
// draw methods
85
TMVA::DecisionTree
*
ReadTree
(
TString
* &vars,
Int_t
itree );
86
void
DrawNode
(
TMVA::DecisionTreeNode
*
n
,
87
Double_t
x
,
Double_t
y
,
Double_t
xscale,
Double_t
yscale,
TString
* vars );
88
void
GetNtrees
();
89
90
TString
fWfile
;
91
TString
fMethName
;
92
TString
fDataset
;
93
Int_t
fColorOffset
;
94
95
public
:
96
97
// static function for external deletion
98
static
void
Delete
() {
if
(
fThis
!= 0) {
delete
fThis
;
fThis
= 0; } }
99
100
// slots
101
void
SetItree
();
//*SIGNAL*
102
void
Redraw
();
//*SIGNAL*
103
void
Close
();
//*SIGNAL*
104
105
private
:
106
107
static
StatDialogBDT
*
fThis
;
108
109
};
110
// ========================================================================================
111
112
extern
std::vector<TControlBar*> BDT_Global__cbar;
113
114
// intermediate GUI
115
void
BDT
(
TString
dataset,
const
TString
& fin =
"TMVA.root"
);
116
void
BDT_DeleteTBar
(
int
i);
117
void
BDT
(
TString
dataset,
Int_t
itree,
TString
wfile ,
TString
methName =
"BDT"
,
Bool_t
useTMVAStyle =
kTRUE
) ;
118
119
}
120
#endif
DecisionTree.h
RQ_OBJECT.h
RQ_OBJECT
#define RQ_OBJECT(sender_class)
Definition
RQ_OBJECT.h:87
Bool_t
bool Bool_t
Definition
RtypesCore.h:63
Double_t
double Double_t
Definition
RtypesCore.h:59
kTRUE
const Bool_t kTRUE
Definition
RtypesCore.h:91
TCanvas.h
TColor.h
TControlBar.h
TGButton.h
TGLabel.h
TGNumberEntry.h
TGWindow.h
TPad.h
TPaveText.h
gROOT
#define gROOT
Definition
TROOT.h:406
TStyle.h
TXMLEngine.h
Tools.h
TCanvas
The Canvas class.
Definition
TCanvas.h:23
TColor::GetColor
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
Definition
TColor.cxx:1769
TGCompositeFrame::Cleanup
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition
TGFrame.cxx:952
TGCompositeFrame::Layout
virtual void Layout()
Layout the elements of the composite frame.
Definition
TGFrame.cxx:1242
TGFrame::MapWindow
virtual void MapWindow()
map window
Definition
TGFrame.h:228
TGHorizontalFrame
Definition
TGFrame.h:422
TGMainFrame
Definition
TGFrame.h:443
TGMainFrame::CloseWindow
virtual void CloseWindow()
Close and delete main frame.
Definition
TGFrame.cxx:1731
TGNumberEntry
Definition
TGNumberEntry.h:157
TGTextButton
Definition
TGButton.h:142
TGWindow
Definition
TGWindow.h:31
TGWindow::RaiseWindow
virtual void RaiseWindow()
raise window
Definition
TGWindow.cxx:207
TMVA::DecisionTreeNode
Definition
DecisionTreeNode.h:117
TMVA::DecisionTreeNode::SetIsTraining
static void SetIsTraining(bool on)
Definition
DecisionTreeNode.cxx:546
TMVA::DecisionTree
Implementation of a Decision Tree.
Definition
DecisionTree.h:65
TMVA::StatDialogBDT
Definition
BDT.h:46
TMVA::StatDialogBDT::Close
void Close()
Definition
BDT.cxx:39
TMVA::StatDialogBDT::RaiseDialog
void RaiseDialog()
Definition
BDT.h:66
TMVA::StatDialogBDT::fMethName
TString fMethName
Definition
BDT.h:91
TMVA::StatDialogBDT::fWfile
TString fWfile
Definition
BDT.h:90
TMVA::StatDialogBDT::fDrawButton
TGTextButton * fDrawButton
Definition
BDT.h:79
TMVA::StatDialogBDT::fItree
Int_t fItree
Definition
BDT.h:71
TMVA::StatDialogBDT::fMain
TGMainFrame * fMain
Definition
BDT.h:70
TMVA::StatDialogBDT::Delete
static void Delete()
Definition
BDT.h:98
TMVA::StatDialogBDT::ReadTree
TMVA::DecisionTree * ReadTree(TString *&vars, Int_t itree)
Definition
BDT.cxx:207
TMVA::StatDialogBDT::fCanvas
TCanvas * fCanvas
Definition
BDT.h:73
TMVA::StatDialogBDT::DrawTree
void DrawTree(Int_t itree)
Definition
BDT.cxx:292
TMVA::StatDialogBDT::GetNtrees
void GetNtrees()
Definition
BDT.cxx:108
TMVA::StatDialogBDT::Redraw
void Redraw()
Definition
BDT.cxx:34
TMVA::StatDialogBDT::SetItree
void SetItree()
Definition
BDT.cxx:29
TMVA::StatDialogBDT::fButtons
TGHorizontalFrame * fButtons
Definition
BDT.h:78
TMVA::StatDialogBDT::fColorOffset
Int_t fColorOffset
Definition
BDT.h:93
TMVA::StatDialogBDT::fInput
TGNumberEntry * fInput
Definition
BDT.h:76
TMVA::StatDialogBDT::DrawNode
void DrawNode(TMVA::DecisionTreeNode *n, Double_t x, Double_t y, Double_t xscale, Double_t yscale, TString *vars)
recursively puts an entries in the histogram for the node and its daughters
Definition
BDT.cxx:158
TMVA::StatDialogBDT::fNtrees
Int_t fNtrees
Definition
BDT.h:72
TMVA::StatDialogBDT::fDataset
TString fDataset
Definition
BDT.h:92
TMVA::StatDialogBDT::~StatDialogBDT
virtual ~StatDialogBDT()
Definition
BDT.h:54
TMVA::StatDialogBDT::fThis
static StatDialogBDT * fThis
Definition
BDT.h:107
TMVA::StatDialogBDT::fCloseButton
TGTextButton * fCloseButton
Definition
BDT.h:80
TMVA::StatDialogBDT::UpdateCanvases
void UpdateCanvases()
Definition
BDT.cxx:103
TString
Basic string class.
Definition
TString.h:136
int
y
Double_t y[n]
Definition
legend1.C:17
x
Double_t x[n]
Definition
legend1.C:17
n
const Int_t n
Definition
legend1.C:16
TMVA
create variable transformations
Definition
GeneticMinimizer.h:22
TMVA::getSigColorT
Int_t getSigColorT()
Definition
BDT.h:40
TMVA::getIntColorT
Int_t getIntColorT()
Definition
BDT.h:42
TMVA::getIntColorF
Int_t getIntColorF()
Definition
BDT.h:37
TMVA::BDT_DeleteTBar
void BDT_DeleteTBar(int i)
TMVA::getSigColorF
Int_t getSigColorF()
Definition
BDT.h:35
TMVA::BDT
void BDT(TString dataset, const TString &fin="TMVA.root")
TMVA::getBkgColorT
Int_t getBkgColorT()
Definition
BDT.h:41
TMVA::getBkgColorF
Int_t getBkgColorF()
Definition
BDT.h:36
tmvaglob.h
tmva
tmvagui
inc
TMVA
BDT.h
ROOT v6-24 - Reference Guide Generated on Tue Aug 22 2023 03:06:53 (GVA Time) using Doxygen 1.9.8