Namespace: Ml
-
namespace ml
Functions
-
ROOT::RDF::RNode StandardTransformer(ROOT::RDF::RNode df, const std::string &inputname, const std::string &outputname, const std::string ¶m_file, const std::string &var_type)
Function to perform a standard transformation of input variables for NN evaluation.
- Parameters:
df – The input dataframe
inputname – name of the variable which should be transformed
outputname – name of the output column
param_file – path to a json file with a dictionary of mean and std values
var_type – variable data type for correct processing e.g. “i” for integer or “f” for float
- Returns:
a new dataframe containing the new column
-
ROOT::RDF::RNode StandardTransformer(ROOT::RDF::RNode df, correctionManager::CorrectionManager &correctionManager, const std::string &inputname, const std::string &outputname, const std::string ¶m_file, const std::string &var_type)
Function to perform a standard transformation of input variables for NN evaluation.
- Parameters:
df – The input dataframe
correctionManager – correction manager
inputname – name of the variable which should be transformed
outputname – name of the output column
param_file – path to a json file with a dictionary of mean and std values
var_type – variable data type for correct processing e.g. “i” for integer or “f” for float
- Returns:
a new dataframe containing the new column
-
template<std::size_t nParameters>
inline ROOT::RDF::RNode GenericOnnxEvaluator(ROOT::RDF::RNode df, OnnxSessionManager &onnxSessionManager, const std::string &outputname, const std::string &model_file_path, const std::vector<std::string> &input_vec) Generic Function to evaluate an ONNX model using the ONNX Runtime Due to unknowns reasons, this function must be implemented inline in the header file, otherwise the linker will complain about undefined references. Moving the implementation to the source file will result in a linker error. Why, I don’t know… This generic implementation currenty supports only NNs with one input tensor and one output tensor
- Parameters:
df – the dataframe to add the quantity to
onnxSessionManager – The OnnxSessionManager object to handle the runtime session. By default this is called onnxSessionManager and created in the main function
outputname – Name of the output column
model_file_path – Path to the ONNX model file
input_vec – Vector of input variable names, the order of the variables must match the order of the input nodes in the ONNX model
- Returns:
a dataframe with the filter applied
-
ROOT::RDF::RNode StandardTransformer(ROOT::RDF::RNode df, const std::string &inputname, const std::string &outputname, const std::string ¶m_file, const std::string &var_type)