Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
BDT_Reg.h
Go to the documentation of this file.
1#ifndef BDT_Reg__HH
2#define BDT_Reg__HH
3
4#include <vector>
5
6#include "TMVA/tmvaglob.h"
7
8#include "RQ_OBJECT.h"
9
10#include "TStyle.h"
11#include "TPad.h"
12#include "TCanvas.h"
13#include "TFile.h"
14#include "TColor.h"
15#include "TPaveText.h"
16#include "TControlBar.h"
17
18#include "TGWindow.h"
19#include "TGButton.h"
20#include "TGLabel.h"
21#include "TGNumberEntry.h"
22
23#include "TMVA/DecisionTree.h"
24#include "TMVA/Tools.h"
25#include "TXMLEngine.h"
26#include "TMVA/BDT.h"
27// Uncomment this only if the link problem is solved. The include statement tends
28// to use the ROOT classes rather than the local TMVA release
29// #include "TMVA/DecisionTree.h"
30// #include "TMVA/DecisionTreeNode.h"
31
32namespace TMVA{
33
34
35
37
38 RQ_OBJECT("StatDialogBDTReg")
39
40 public:
41
42 StatDialogBDTReg(TString dataset, const TGWindow* p, TString wfile,
43 TString methName = "BDT", Int_t itree = 0 );
44 virtual ~StatDialogBDTReg() {
46 fThis = nullptr;
48 fMain->Cleanup();
49 if(gROOT->GetListOfCanvases()->FindObject(fCanvas))
50 delete fCanvas;
51 }
52
53 // draw method
54 void DrawTree( Int_t itree );
55
56 void RaiseDialog() { if (fMain) { fMain->RaiseWindow(); fMain->Layout(); fMain->MapWindow(); } }
57
58 private:
59
65
67
71
72 void UpdateCanvases();
73
74 // draw methods
75 TMVA::DecisionTree* ReadTree( TString * &vars, Int_t itree );
77 Double_t x, Double_t y, Double_t xscale, Double_t yscale, TString* vars );
78 void GetNtrees();
79
82
83 public:
84
85 // static function for external deletion
86 static void Delete() { if (fThis) { delete fThis; fThis = nullptr; } }
87
88 // slots
89 void SetItree(); //*SIGNAL*
90 void Redraw(); //*SIGNAL*
91 void Close(); //*SIGNAL*
92
93 private:
94
96
97 };
98
99 // ========================================================================================
100
101 extern std::vector<TControlBar*> BDTReg_Global__cbar;
102
103 // intermediate GUI
104 void BDT_Reg(TString dataset, const TString& fin = "TMVAReg.root" );
105 void BDTReg_DeleteTBar(int i);
106
107 void BDT_Reg(TString dataset, Int_t itree, TString wfile = "", TString methName = "BDT", Bool_t useTMVAStyle = kTRUE );
108
109
110}
111#endif
#define RQ_OBJECT(sender_class)
Definition RQ_OBJECT.h:87
bool Bool_t
Definition RtypesCore.h:63
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
winID h TVirtualViewer3D TVirtualGLPainter p
#define gROOT
Definition TROOT.h:406
The Canvas class.
Definition TCanvas.h:23
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition TGFrame.cxx:967
void Layout() override
Layout the elements of the composite frame.
Definition TGFrame.cxx:1257
void MapWindow() override
map window
Definition TGFrame.h:204
A composite frame that layout their children in horizontal way.
Definition TGFrame.h:385
Defines top level windows that interact with the system Window Manager.
Definition TGFrame.h:397
virtual void CloseWindow()
Close and delete main frame.
Definition TGFrame.cxx:1770
TGNumberEntry is a number entry input widget with up/down buttons.
Yield an action as soon as it is clicked.
Definition TGButton.h:142
ROOT GUI Window base class.
Definition TGWindow.h:23
virtual void RaiseWindow()
raise window
Definition TGWindow.cxx:208
static void SetIsTraining(bool on)
Implementation of a Decision Tree.
TMVA::DecisionTree * ReadTree(TString *&vars, Int_t itree)
Definition BDT_Reg.cxx:205
TGHorizontalFrame * fButtons
Definition BDT_Reg.h:68
static StatDialogBDTReg * fThis
Definition BDT_Reg.h:95
void DrawTree(Int_t itree)
Definition BDT_Reg.cxx:292
TGNumberEntry * fInput
Definition BDT_Reg.h:66
TGMainFrame * fMain
Definition BDT_Reg.h:60
TGTextButton * fDrawButton
Definition BDT_Reg.h:69
static void Delete()
Definition BDT_Reg.h:86
TGTextButton * fCloseButton
Definition BDT_Reg.h:70
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:156
std::vector< TControlBar * > BDTReg_Global__cbar
Definition BDT_Reg.h:101
Basic string class.
Definition TString.h:139
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16
create variable transformations
void BDTReg_DeleteTBar(int i)
void BDT(TString dataset, const TString &fin="TMVA.root")
void BDT_Reg(TString dataset, const TString &fin="TMVAReg.root")