|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #ifndef ELECTRONDNNCALCULATOR_H
8 #define ELECTRONDNNCALCULATOR_H
20 #include "lwtnn/generic/FastGraph.hh"
28 const std::string& modelFileName,
29 const std::string& quantileFileName,
30 const std::vector<std::string>& variablesName,
31 const bool multiClass);
46 std::unique_ptr<lwt::generic::FastGraph<float>>
m_graph = 0;
~ElectronDNNCalculator()
Standard destructor.
std::unique_ptr< lwt::generic::FastGraph< float > > m_graph
DNN interface via lwtnn.
ElectronDNNCalculator(AsgElectronSelectorTool *owner, const std::string &modelFileName, const std::string &quantileFileName, const std::vector< std::string > &variablesName, const bool multiClass)
Constructor of the class.
double transformInput(const std::vector< double > &quantiles, double value) const
transform the input variables according to a given QuantileTransformer.
base class to forward messages to another class
std::vector< double > m_references
Reference values for the QuantileTransformer. Basically just equidistant bins between 0 and 1.
bool m_multiClass
Whether the used model is a multiclass model or not.
std::vector< std::string > m_variables
Model variables.
Eigen::Matrix< float, -1, 1 > calculate(const std::vector< double > &) const
Get the prediction of the DNN model.
int readQuantileTransformer(TTree *tree)
read the bins and values of the QuantileTransformer to transform the input variables.
std::vector< std::vector< double > > m_quantiles
Quantile values for each variable that needs to be transformed with the QuantileTransformer.
Used by AsgElectronSelectorTool to calculate the score of a python trained DNN using lwtnn as interfa...