16 const std::vector<std::string>&
variables,
54 const std::vector<std::string>&
variables,
86 <<
"Input variable " <<
it->first
87 <<
" is missing from the list of inputs. The returned discriminator value might not be sensible.";
98 <<
"Spectator variable " <<
it->first
99 <<
" is missing from the list of inputs. The returned discriminator value might not be sensible.";
121 <<
"Input variable " <<
it->first
122 <<
" is missing from the list of inputs. The returned discriminator value might not be sensible.";
139 edm::LogError(
"InitializationError") <<
"TMVAEvaluator not properly initialized.";
144 edm::LogError(
"MissingInputs") <<
"Too few inputs provided (" <<
inputs.size() <<
" provided but " 146 <<
" spectator variables expected).";
149 edm::LogError(
"MissingInputVariable(s)") <<
"Too few input variables provided (" <<
inputs.size()
150 <<
" provided but " <<
mVariables.size() <<
" expected).";
157 <<
"Use of spectator variables with GBRForest is not supported. Spectator variables will be ignored.";
float evaluateTMVA(const std::map< std::string, float > &inputs, bool useSpectators) const
void initializeGBRForest(const GBRForest *gbrForest, const std::vector< std::string > &variables, const std::vector< std::string > &spectators, bool useAdaBoost=false)
std::map< std::string, std::pair< size_t, float > > mVariables
Log< level::Error, false > LogError
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)
std::shared_ptr< const GBRForest > mGBRForest
float evaluate(const std::map< std::string, float > &inputs, bool useSpectators=false) const
std::map< std::string, std::pair< size_t, float > > mSpectators
float evaluateGBRForest(const std::map< std::string, float > &inputs) const
TMVA::IMethod * loadTMVAWeights(TMVA::Reader *reader, const std::string &method, const std::string &weightFile, bool verbose=false)
std::unique_ptr< TMVA::Reader > mReader
Log< level::Warning, false > LogWarning