#include <TMVAEvaluator.h>
Public Member Functions | |
float | evaluate (const std::map< std::string, float > &inputs, bool useSpectators=false) const |
float | evaluateGBRForest (const std::map< std::string, float > &inputs) const |
float | evaluateTMVA (const std::map< std::string, float > &inputs, bool useSpectators) const |
void | initialize (const std::string &options, const std::string &method, const std::string &weightFile, const std::vector< std::string > &variables, const std::vector< std::string > &spectators, bool useGBRForest=false, bool useAdaBoost=false) |
void | initializeGBRForest (const GBRForest *gbrForest, const std::vector< std::string > &variables, const std::vector< std::string > &spectators, bool useAdaBoost=false) |
TMVAEvaluator () | |
Private Attributes | |
std::mutex | m_mutex |
std::shared_ptr< const GBRForest > | mGBRForest |
bool | mIsInitialized |
std::string | mMethod |
std::unique_ptr< TMVA::Reader > | mReader |
std::map< std::string, std::pair< size_t, float > > | mSpectators |
bool | mUseAdaBoost |
bool | mUsingGBRForest |
std::map< std::string, std::pair< size_t, float > > | mVariables |
Definition at line 16 of file TMVAEvaluator.h.
TMVAEvaluator::TMVAEvaluator | ( | ) |
Definition at line 11 of file TMVAEvaluator.cc.
float TMVAEvaluator::evaluate | ( | const std::map< std::string, float > & | inputs, |
bool | useSpectators = false |
||
) | const |
Definition at line 134 of file TMVAEvaluator.cc.
References evaluateGBRForest(), evaluateTMVA(), PixelMapPlotter::inputs, mIsInitialized, mSpectators, mUsingGBRForest, mVariables, and relativeConstraints::value.
float TMVAEvaluator::evaluateGBRForest | ( | const std::map< std::string, float > & | inputs | ) | const |
Definition at line 109 of file TMVAEvaluator.cc.
References PixelMapPlotter::inputs, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, mGBRForest, mUseAdaBoost, mVariables, and relativeConstraints::value.
Referenced by evaluate().
float TMVAEvaluator::evaluateTMVA | ( | const std::map< std::string, float > & | inputs, |
bool | useSpectators | ||
) | const |
Definition at line 73 of file TMVAEvaluator.cc.
References PixelMapPlotter::inputs, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, CommonMethods::lock(), m_mutex, mMethod, mReader, mSpectators, mVariables, and relativeConstraints::value.
Referenced by evaluate().
void TMVAEvaluator::initialize | ( | const std::string & | options, |
const std::string & | method, | ||
const std::string & | weightFile, | ||
const std::vector< std::string > & | variables, | ||
const std::vector< std::string > & | spectators, | ||
bool | useGBRForest = false , |
||
bool | useAdaBoost = false |
||
) |
Definition at line 13 of file TMVAEvaluator.cc.
References createGBRForest(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, reco::details::loadTMVAWeights(), AlcaSiPixelAliHarvester0T_cff::method, mGBRForest, mIsInitialized, mMethod, mReader, mSpectators, mUseAdaBoost, mUsingGBRForest, mVariables, candidateCombinedMVAV2Computer_cfi::spectators, HLT_2024v13_cff::useAdaBoost, HLT_2024v13_cff::useGBRForest, hcalRecHitTable_cff::variables, and HLT_2024v13_cff::weightFile.
void TMVAEvaluator::initializeGBRForest | ( | const GBRForest * | gbrForest, |
const std::vector< std::string > & | variables, | ||
const std::vector< std::string > & | spectators, | ||
bool | useAdaBoost = false |
||
) |
Definition at line 53 of file TMVAEvaluator.cc.
References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, mGBRForest, mIsInitialized, mSpectators, mUseAdaBoost, mUsingGBRForest, mVariables, candidateCombinedMVAV2Computer_cfi::spectators, HLT_2024v13_cff::useAdaBoost, and hcalRecHitTable_cff::variables.
|
mutableprivate |
Definition at line 43 of file TMVAEvaluator.h.
Referenced by evaluateTMVA().
|
private |
Definition at line 45 of file TMVAEvaluator.h.
Referenced by evaluateGBRForest(), initialize(), and initializeGBRForest().
|
private |
Definition at line 38 of file TMVAEvaluator.h.
Referenced by evaluate(), initialize(), and initializeGBRForest().
|
private |
Definition at line 42 of file TMVAEvaluator.h.
Referenced by evaluateTMVA(), and initialize().
|
private |
Definition at line 44 of file TMVAEvaluator.h.
Referenced by evaluateTMVA(), and initialize().
|
mutableprivate |
Definition at line 48 of file TMVAEvaluator.h.
Referenced by evaluate(), evaluateTMVA(), initialize(), and initializeGBRForest().
|
private |
Definition at line 40 of file TMVAEvaluator.h.
Referenced by evaluateGBRForest(), initialize(), and initializeGBRForest().
|
private |
Definition at line 39 of file TMVAEvaluator.h.
Referenced by evaluate(), initialize(), and initializeGBRForest().
|
mutableprivate |
Definition at line 47 of file TMVAEvaluator.h.
Referenced by evaluate(), evaluateGBRForest(), evaluateTMVA(), initialize(), and initializeGBRForest().