Logo ROOT  
Reference Guide
TMVA::IPythonInteractive Class Reference

This class is needed by JsMVA, and it's a helper class for tracking errors during the training in Jupyter notebook.

It’s only initialized in Jupyter notebook context. In initialization we specify some title, and a TGraph will be created for every title. We can add new data points easily to all TGraphs. These graphs are added to a TMultiGraph, and during an interactive training we get this TMultiGraph object and plot it with JsROOT.

Definition at line 94 of file MethodBase.h.

Public Member Functions

 IPythonInteractive ()
 standard constructor More...
 
 ~IPythonInteractive ()
 standard destructor More...
 
void AddPoint (Double_t x, Double_t y1, Double_t y2)
 This function is used only in 2 TGraph case, and it will add new data points to graphs. More...
 
void AddPoint (std::vector< Double_t > &dat)
 This function can add data points to as many TGraphs as we have. More...
 
void ClearGraphs ()
 This function sets the point number to 0 for all graphs. More...
 
TMultiGraphGet ()
 
void Init (std::vector< TString > &graphTitles)
 This function gets some title and it creates a TGraph for every title. More...
 
bool NotInitialized ()
 

Private Attributes

std::vector< TGraph * > fGraphs
 
Int_t fIndex
 
TMultiGraphfMultiGraph
 
Int_t fNumGraphs
 

#include <TMVA/MethodBase.h>

Constructor & Destructor Documentation

◆ IPythonInteractive()

TMVA::IPythonInteractive::IPythonInteractive ( )

standard constructor

Definition at line 151 of file MethodBase.cxx.

◆ ~IPythonInteractive()

TMVA::IPythonInteractive::~IPythonInteractive ( )

standard destructor

Definition at line 159 of file MethodBase.cxx.

Member Function Documentation

◆ AddPoint() [1/2]

void TMVA::IPythonInteractive::AddPoint ( Double_t  x,
Double_t  y1,
Double_t  y2 
)

This function is used only in 2 TGraph case, and it will add new data points to graphs.

Parameters
[in]xthe x coordinate
[in]y1the y coordinate for the first TGraph
[in]y2the y coordinate for the second TGraph

Definition at line 212 of file MethodBase.cxx.

◆ AddPoint() [2/2]

void TMVA::IPythonInteractive::AddPoint ( std::vector< Double_t > &  dat)

This function can add data points to as many TGraphs as we have.

Parameters
[in]datvector of data points. The dat[0] contains the x coordinate, dat[1] contains the y coordinate for first TGraph, dat[2] for second, ...

Definition at line 228 of file MethodBase.cxx.

◆ ClearGraphs()

void TMVA::IPythonInteractive::ClearGraphs ( )

This function sets the point number to 0 for all graphs.

Definition at line 198 of file MethodBase.cxx.

◆ Get()

TMultiGraph * TMVA::IPythonInteractive::Get ( )
inline

Definition at line 102 of file MethodBase.h.

◆ Init()

void TMVA::IPythonInteractive::Init ( std::vector< TString > &  graphTitles)

This function gets some title and it creates a TGraph for every title.

It also sets up the style for every TGraph. All graphs are added to a single TMultiGraph.

Parameters
[in]graphTitlesvector of titles

Definition at line 174 of file MethodBase.cxx.

◆ NotInitialized()

bool TMVA::IPythonInteractive::NotInitialized ( )
inline

Definition at line 103 of file MethodBase.h.

Member Data Documentation

◆ fGraphs

std::vector<TGraph*> TMVA::IPythonInteractive::fGraphs
private

Definition at line 106 of file MethodBase.h.

◆ fIndex

Int_t TMVA::IPythonInteractive::fIndex
private

Definition at line 108 of file MethodBase.h.

◆ fMultiGraph

TMultiGraph* TMVA::IPythonInteractive::fMultiGraph
private

Definition at line 105 of file MethodBase.h.

◆ fNumGraphs

Int_t TMVA::IPythonInteractive::fNumGraphs
private

Definition at line 107 of file MethodBase.h.

Libraries for TMVA::IPythonInteractive:
[legend]

The documentation for this class was generated from the following files: