ROOT
6.14/05
Reference Guide
tmva
tmvagui
inc
TMVA
BDT_Reg.h
Go to the documentation of this file.
1
#ifndef BDT_Reg__HH
2
#define BDT_Reg__HH
3
#include <iostream>
4
#include <iomanip>
5
#include <fstream>
6
7
#include "
TMVA/tmvaglob.h
"
8
9
#include "
RQ_OBJECT.h
"
10
11
#include "
TROOT.h
"
12
#include "
TStyle.h
"
13
#include "
TPad.h
"
14
#include "
TCanvas.h
"
15
#include "
TLine.h
"
16
#include "
TFile.h
"
17
#include "
TColor.h
"
18
#include "
TPaveText.h
"
19
#include "
TObjString.h
"
20
#include "
TControlBar.h
"
21
22
#include "
TGWindow.h
"
23
#include "
TGButton.h
"
24
#include "
TGLabel.h
"
25
#include "
TGNumberEntry.h
"
26
27
#include "
TMVA/DecisionTree.h
"
28
#include "
TMVA/Tools.h
"
29
#include "
TXMLEngine.h
"
30
#include "
TMVA/BDT.h
"
31
// Uncomment this only if the link problem is solved. The include statement tends
32
// to use the ROOT classes rather than the local TMVA release
33
// #include "TMVA/DecisionTree.h"
34
// #include "TMVA/DecisionTreeNode.h"
35
36
namespace
TMVA
{
37
38
39
40
class
StatDialogBDTReg
{
41
42
RQ_OBJECT
(
"StatDialogBDTReg"
)
43
44
public
:
45
46
StatDialogBDTReg
(
TString
dataset,
const
TGWindow
* p,
TString
wfile,
47
TString
methName =
"BDT"
,
Int_t
itree = 0 );
48
virtual
~StatDialogBDTReg
() {
49
TMVA::DecisionTreeNode::fgIsTraining
=
false
;
50
fThis
= 0;
51
fMain
->
CloseWindow
();
52
fMain
->
Cleanup
();
53
if
(
gROOT
->GetListOfCanvases()->FindObject(
fCanvas
))
54
delete
fCanvas
;
55
}
56
57
// draw method
58
void
DrawTree
(
Int_t
itree );
59
60
void
RaiseDialog
() {
if
(
fMain
) {
fMain
->
RaiseWindow
();
fMain
->
Layout
();
fMain
->
MapWindow
(); } }
61
62
private
:
63
64
TGMainFrame
*
fMain
;
65
Int_t
fItree
;
66
Int_t
fNtrees
;
67
TCanvas
*
fCanvas
;
68
TString
fDataset
;
69
70
TGNumberEntry
*
fInput
;
71
72
TGHorizontalFrame
*
fButtons
;
73
TGTextButton
*
fDrawButton
;
74
TGTextButton
*
fCloseButton
;
75
76
void
UpdateCanvases
();
77
78
// draw methods
79
TMVA::DecisionTree
*
ReadTree
(
TString
* &vars,
Int_t
itree );
80
void
DrawNode
(
TMVA::DecisionTreeNode
*
n
,
81
Double_t
x
,
Double_t
y
,
Double_t
xscale,
Double_t
yscale,
TString
* vars );
82
void
GetNtrees
();
83
84
TString
fWfile
;
85
TString
fMethName
;
86
87
public
:
88
89
// static function for external deletion
90
static
void
Delete
() {
if
(
fThis
!= 0) {
delete
fThis
;
fThis
= 0; } }
91
92
// slots
93
void
SetItree
();
//*SIGNAL*
94
void
Redraw
();
//*SIGNAL*
95
void
Close
();
//*SIGNAL*
96
97
private
:
98
99
static
StatDialogBDTReg
*
fThis
;
100
101
};
102
103
// ========================================================================================
104
105
extern
std::vector<TControlBar*> BDTReg_Global__cbar;
106
107
// intermediate GUI
108
void
BDT_Reg
(
TString
dataset,
const
TString
& fin =
"TMVAReg.root"
);
109
void
BDTReg_DeleteTBar
(
int
i);
110
111
void
BDT_Reg
(
TString
dataset,
Int_t
itree,
TString
wfile =
""
,
TString
methName =
"BDT"
,
Bool_t
useTMVAStyle =
kTRUE
);
112
113
114
}
115
#endif
DecisionTree.h
RQ_OBJECT.h
TMVA::DecisionTreeNode::fgIsTraining
static bool fgIsTraining
Definition:
DecisionTreeNode.h:349
TMVA::StatDialogBDTReg::fCanvas
TCanvas * fCanvas
Definition:
BDT_Reg.h:67
TMVA::StatDialogBDTReg::fDataset
TString fDataset
Definition:
BDT_Reg.h:68
TMVA::StatDialogBDTReg::fItree
Int_t fItree
Definition:
BDT_Reg.h:65
TGTextButton
Definition:
TGButton.h:142
TXMLEngine.h
TGNumberEntry.h
TMVA::StatDialogBDTReg::fMain
TGMainFrame * fMain
Definition:
BDT_Reg.h:64
TMVA::StatDialogBDTReg::fDrawButton
TGTextButton * fDrawButton
Definition:
BDT_Reg.h:73
gROOT
#define gROOT
Definition:
TROOT.h:410
TFile.h
TString
Basic string class.
Definition:
TString.h:131
TGWindow.h
Int_t
int Int_t
Definition:
RtypesCore.h:41
Bool_t
bool Bool_t
Definition:
RtypesCore.h:59
TMVA::BDT_Reg
void BDT_Reg(TString dataset, const TString &fin="TMVAReg.root")
TPaveText.h
TMVA::StatDialogBDTReg::fNtrees
Int_t fNtrees
Definition:
BDT_Reg.h:66
TGCompositeFrame::Layout
virtual void Layout()
Layout the elements of the composite frame.
Definition:
TGFrame.cxx:1239
TMVA::StatDialogBDTReg::StatDialogBDTReg
StatDialogBDTReg(TString dataset, const TGWindow *p, TString wfile, TString methName="BDT", Int_t itree=0)
Definition:
BDT_Reg.cxx:49
x
Double_t x[n]
Definition:
legend1.C:17
TMVA::StatDialogBDTReg::ReadTree
TMVA::DecisionTree * ReadTree(TString *&vars, Int_t itree)
Definition:
BDT_Reg.cxx:210
TControlBar.h
TGLabel.h
TMVA::StatDialogBDTReg::SetItree
void SetItree()
Definition:
BDT_Reg.cxx:34
TCanvas.h
TGHorizontalFrame
Definition:
TGFrame.h:445
TMVA::StatDialogBDTReg::Close
void Close()
Definition:
BDT_Reg.cxx:44
TMVA::StatDialogBDTReg::fMethName
TString fMethName
Definition:
BDT_Reg.h:85
TMVA::StatDialogBDTReg::fCloseButton
TGTextButton * fCloseButton
Definition:
BDT_Reg.h:74
TMVA::StatDialogBDTReg::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_Reg.cxx:161
TMVA::StatDialogBDTReg::fInput
TGNumberEntry * fInput
Definition:
BDT_Reg.h:70
TGWindow
Definition:
TGWindow.h:32
TObjString.h
tmvaglob.h
TROOT.h
TGMainFrame::CloseWindow
virtual void CloseWindow()
Close and delete main frame.
Definition:
TGFrame.cxx:1728
TMVA::DecisionTree
Implementation of a Decision Tree.
Definition:
DecisionTree.h:64
TMVA::StatDialogBDTReg::RaiseDialog
void RaiseDialog()
Definition:
BDT_Reg.h:60
RQ_OBJECT
#define RQ_OBJECT(sender_class)
Definition:
RQ_OBJECT.h:87
BDT.h
TMVA::StatDialogBDTReg::UpdateCanvases
void UpdateCanvases()
Definition:
BDT_Reg.cxx:106
TMVA::StatDialogBDTReg
Definition:
BDT_Reg.h:40
TCanvas
The Canvas class.
Definition:
TCanvas.h:31
TMVA::StatDialogBDTReg::Delete
static void Delete()
Definition:
BDT_Reg.h:90
TStyle.h
Double_t
double Double_t
Definition:
RtypesCore.h:55
TMVA::StatDialogBDTReg::~StatDialogBDTReg
virtual ~StatDialogBDTReg()
Definition:
BDT_Reg.h:48
TMVA::StatDialogBDTReg::GetNtrees
void GetNtrees()
Definition:
BDT_Reg.cxx:111
TGWindow::RaiseWindow
virtual void RaiseWindow()
Definition:
TGWindow.h:94
y
Double_t y[n]
Definition:
legend1.C:17
TMVA::StatDialogBDTReg::Redraw
void Redraw()
Definition:
BDT_Reg.cxx:39
TMVA::StatDialogBDTReg::fThis
static StatDialogBDTReg * fThis
Definition:
BDT_Reg.h:99
TMVA::StatDialogBDTReg::fButtons
TGHorizontalFrame * fButtons
Definition:
BDT_Reg.h:72
TGNumberEntry
Definition:
TGNumberEntry.h:156
TMVA
Abstract ClassifierFactory template that handles arbitrary types.
Definition:
GeneticMinimizer.h:21
Tools.h
TGFrame::MapWindow
virtual void MapWindow()
Definition:
TGFrame.h:251
TColor.h
TMVA::StatDialogBDTReg::DrawTree
void DrawTree(Int_t itree)
Definition:
BDT_Reg.cxx:297
TPad.h
TLine.h
TGCompositeFrame::Cleanup
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition:
TGFrame.cxx:949
TGButton.h
kTRUE
const Bool_t kTRUE
Definition:
RtypesCore.h:87
n
const Int_t n
Definition:
legend1.C:16
TGMainFrame
Definition:
TGFrame.h:466
TMVA::DecisionTreeNode
Definition:
DecisionTreeNode.h:116
TMVA::BDTReg_DeleteTBar
void BDTReg_DeleteTBar(int i)
TMVA::StatDialogBDTReg::fWfile
TString fWfile
Definition:
BDT_Reg.h:84