LArMvaHelper class. More...
#include <LArMvaHelper.h>
Public Types | |
typedef MvaTypes::MvaFeature | MvaFeature |
typedef MvaTypes::MvaFeatureVector | MvaFeatureVector |
Static Public Member Functions | |
template<typename... TLISTS> | |
static pandora::StatusCode | ProduceTrainingExample (const std::string &trainingOutputFile, const bool result, TLISTS &&...featureLists) |
Produce a training example with the given features and result. More... | |
template<typename... TLISTS> | |
static bool | Classify (const MvaInterface &classifier, TLISTS &&...featureLists) |
Use the trained classifier to predict the boolean class of an example. More... | |
template<typename... TLISTS> | |
static double | CalculateClassificationScore (const MvaInterface &classifier, TLISTS &&...featureLists) |
Use the trained classifer to calculate the classification score of an example (>0 means boolean class true) More... | |
template<typename... TLISTS> | |
static double | CalculateProbability (const MvaInterface &classifier, TLISTS &&...featureLists) |
Use the trained mva to calculate a classification probability for an example. More... | |
template<typename... Ts, typename... TARGS> | |
static MvaFeatureVector | CalculateFeatures (const MvaFeatureToolVector< Ts... > &featureToolVector, TARGS &&...args) |
Calculate the features in a given feature tool vector. More... | |
template<typename T , typename... Ts, typename... TARGS> | |
static MvaFeatureVector | CalculateFeaturesOfType (const MvaFeatureToolVector< Ts... > &featureToolVector, TARGS &&...args) |
Calculate the features of a given derived feature tool type in a feature tool vector. More... | |
template<typename... Ts> | |
static pandora::StatusCode | AddFeatureToolToVector (pandora::AlgorithmTool *const pFeatureTool, MvaFeatureToolVector< Ts... > &featureToolVector) |
Add a feature tool to a vector of feature tools. More... | |
Static Private Member Functions | |
static std::string | GetTimestampString () |
Get a timestamp string for this point in time. More... | |
template<typename TLIST , typename... TLISTS> | |
static pandora::StatusCode | WriteFeaturesToFile (std::ofstream &outfile, const std::string &delimiter, TLIST &&featureList, TLISTS &&...featureLists) |
Recursively write the features of the given lists to file. More... | |
static pandora::StatusCode | WriteFeaturesToFile (std::ofstream &, const std::string &) |
Recursively write the features of the given lists to file (terminating method) More... | |
template<typename TLIST > | |
static pandora::StatusCode | WriteFeaturesToFileImpl (std::ofstream &outfile, const std::string &delimiter, TLIST &&featureList) |
Write the features of the given list to file (implementation method) More... | |
template<typename TLIST , typename... TLISTS> | |
static MvaFeatureVector | ConcatenateFeatureLists (TLIST &&featureList, TLISTS &&...featureLists) |
Recursively concatenate vectors of features. More... | |
static MvaFeatureVector | ConcatenateFeatureLists () |
Recursively concatenate vectors of features (terminating method) More... | |
LArMvaHelper class.
Definition at line 54 of file LArMvaHelper.h.
Definition at line 57 of file LArMvaHelper.h.
Definition at line 58 of file LArMvaHelper.h.
|
static |
Add a feature tool to a vector of feature tools.
pFeatureTool | the feature tool |
featureToolVector | the vector to append |
Definition at line 274 of file LArMvaHelper.h.
|
static |
Use the trained classifer to calculate the classification score of an example (>0 means boolean class true)
classifier | the classifier |
featureLists | the lists of features |
Definition at line 228 of file LArMvaHelper.h.
|
static |
Calculate the features in a given feature tool vector.
featureToolVector | the feature tool vector |
args | arguments to pass to the tool |
Definition at line 244 of file LArMvaHelper.h.
|
static |
Calculate the features of a given derived feature tool type in a feature tool vector.
featureToolVector | the feature tool vector |
args | arguments to pass to the tool |
Definition at line 257 of file LArMvaHelper.h.
|
static |
Use the trained mva to calculate a classification probability for an example.
classifier | the classifier |
featureLists | the lists of features |
Definition at line 236 of file LArMvaHelper.h.
|
static |
Use the trained classifier to predict the boolean class of an example.
classifier | the classifier |
featureLists | the lists of features |
Definition at line 220 of file LArMvaHelper.h.
|
staticprivate |
Recursively concatenate vectors of features.
featureList | a list of features |
featureLists | optional further lists of features |
Definition at line 339 of file LArMvaHelper.h.
|
inlinestaticprivate |
Recursively concatenate vectors of features (terminating method)
Definition at line 357 of file LArMvaHelper.h.
|
inlinestaticprivate |
Get a timestamp string for this point in time.
Definition at line 287 of file LArMvaHelper.h.
|
static |
Produce a training example with the given features and result.
trainingOutputFile | the file to which to append the example |
featureLists | the lists of features |
Definition at line 197 of file LArMvaHelper.h.
|
inlinestaticprivate |
Recursively write the features of the given lists to file.
outfile | the std::ofstream object to use |
delimiter | the delimiter string |
featureList | a list of features to write |
featureLists | optional further lists of features to write |
Definition at line 308 of file LArMvaHelper.h.
|
inlinestaticprivate |
Recursively write the features of the given lists to file (terminating method)
Definition at line 320 of file LArMvaHelper.h.
|
staticprivate |
Write the features of the given list to file (implementation method)
outfile | the std::ofstream object to use |
delimiter | the delimiter string |
featureList | a list of features to write |
Definition at line 328 of file LArMvaHelper.h.