Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TMVA::Experimental::RReader Class Reference

A replacement for the TMVA::Reader legacy interface.

Performs inference for TMVA models stored as XML files. For neural network inference consider using SOFIE instead.

Definition at line 138 of file RReader.hxx.

Public Member Functions

 RReader (const std::string &path)
 Create TMVA model from XML file.
 
std::vector< float > Compute (const std::vector< float > &x)
 Compute model prediction on vector.
 
std::vector< float > Compute (std::span< const float > x)
 Compute model prediction on a flat batch of events The input is the concatenation of the events' input variables and spectators in row-major layout and the returned vector is flat row-major as well, with size nEvents * numClasses (numClasses = 1 for classification and regression) and the outputs of one event contiguous at y[event * numClasses ...].
 
std::vector< std::string > GetSpectatorNames ()
 
std::vector< std::string > GetVariableNames ()
 

Private Attributes

Internal::AnalysisType fAnalysisType
 
unsigned int fNumClasses
 
std::unique_ptr< Reader > fReader
 
std::vector< std::string > fSpectatorExpressions
 
std::vector< std::string > fSpectators
 
std::vector< float > fSpectatorValues
 
std::vector< std::string > fVariableExpressions
 
std::vector< std::string > fVariables
 
std::vector< float > fVariableValues
 
const char * name = "RReader"
 

#include <TMVA/RReader.hxx>

Constructor & Destructor Documentation

◆ RReader()

TMVA::Experimental::RReader::RReader ( const std::string & path)
inline

Create TMVA model from XML file.

Definition at line 153 of file RReader.hxx.

Member Function Documentation

◆ Compute() [1/2]

std::vector< float > TMVA::Experimental::RReader::Compute ( const std::vector< float > & x)
inline

Compute model prediction on vector.

Definition at line 180 of file RReader.hxx.

◆ Compute() [2/2]

std::vector< float > TMVA::Experimental::RReader::Compute ( std::span< const float > x)
inline

Compute model prediction on a flat batch of events The input is the concatenation of the events' input variables and spectators in row-major layout and the returned vector is flat row-major as well, with size nEvents * numClasses (numClasses = 1 for classification and regression) and the outputs of one event contiguous at y[event * numClasses ...].

Definition at line 222 of file RReader.hxx.

◆ GetSpectatorNames()

std::vector< std::string > TMVA::Experimental::RReader::GetSpectatorNames ( )
inline

Definition at line 268 of file RReader.hxx.

◆ GetVariableNames()

std::vector< std::string > TMVA::Experimental::RReader::GetVariableNames ( )
inline

Definition at line 267 of file RReader.hxx.

Member Data Documentation

◆ fAnalysisType

Internal::AnalysisType TMVA::Experimental::RReader::fAnalysisType
private

Definition at line 149 of file RReader.hxx.

◆ fNumClasses

unsigned int TMVA::Experimental::RReader::fNumClasses
private

Definition at line 147 of file RReader.hxx.

◆ fReader

std::unique_ptr<Reader> TMVA::Experimental::RReader::fReader
private

Definition at line 140 of file RReader.hxx.

◆ fSpectatorExpressions

std::vector<std::string> TMVA::Experimental::RReader::fSpectatorExpressions
private

Definition at line 146 of file RReader.hxx.

◆ fSpectators

std::vector<std::string> TMVA::Experimental::RReader::fSpectators
private

Definition at line 145 of file RReader.hxx.

◆ fSpectatorValues

std::vector<float> TMVA::Experimental::RReader::fSpectatorValues
private

Definition at line 144 of file RReader.hxx.

◆ fVariableExpressions

std::vector<std::string> TMVA::Experimental::RReader::fVariableExpressions
private

Definition at line 143 of file RReader.hxx.

◆ fVariables

std::vector<std::string> TMVA::Experimental::RReader::fVariables
private

Definition at line 142 of file RReader.hxx.

◆ fVariableValues

std::vector<float> TMVA::Experimental::RReader::fVariableValues
private

Definition at line 141 of file RReader.hxx.

◆ name

const char* TMVA::Experimental::RReader::name = "RReader"
private

Definition at line 148 of file RReader.hxx.

Libraries for TMVA::Experimental::RReader:

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