PandaRoot
PndMvaClassifier Class Referenceabstract

#include <PndMvaClassifier.h>

Inheritance diagram for PndMvaClassifier:
PndKnnClassify PndLVQClassify PndMultiClassBdtClassify PndMultiClassMlpClassify PndProjectedKNN PndPrzWindowClassify PndStdKnnClassify

Public Member Functions

 PndMvaClassifier (std::string const &InPut, std::vector< std::string > const &ClassNames, std::vector< std::string > const &VarNames)
 Constructor. More...
 
virtual ~PndMvaClassifier ()
 Destructor. More...
 
virtual void GetMvaValues (std::vector< float > EvtData, std::map< std::string, float > &result)=0
 
virtual std::string * Classify (std::vector< float > EvtData)=0
 
virtual void Initialize ()
 
std::vector< PndMvaClass > const & GetClasses () const
 Get the list of available classes (labels). More...
 
std::vector< PndMvaVariable > const & GetVariables () const
 Get the list of available variables. More...
 

Protected Member Functions

virtual void NormalizeEvent (std::vector< float > &EvtVector) const
 Normalize the given event vector. More...
 
void SetAppType (AppType t)
 

Protected Attributes

PndMvaDataSet m_dataSets
 Data set. Holds event Weights. More...
 

Detailed Description

Main interface definition.

Definition at line 29 of file PndMvaClassifier.h.

Constructor & Destructor Documentation

◆ PndMvaClassifier()

PndMvaClassifier::PndMvaClassifier ( std::string const &  InPut,
std::vector< std::string > const &  ClassNames,
std::vector< std::string > const &  VarNames 
)
explicit

Constructor.

Parameters
InPutInput file name containing weights. Names of available (signal) classes. Names of the used variables(features).

◆ ~PndMvaClassifier()

virtual PndMvaClassifier::~PndMvaClassifier ( )
virtual

Destructor.

Member Function Documentation

◆ Classify()

virtual std::string* PndMvaClassifier::Classify ( std::vector< float >  EvtData)
pure virtual
Parameters
EvtDataEvent, to be classified.
Returns
Name of the class with the best MVA value.

Implemented in PndMultiClassBdtClassify, PndMultiClassMlpClassify, PndKnnClassify, PndPrzWindowClassify, PndStdKnnClassify, PndLVQClassify, and PndProjectedKNN.

◆ GetClasses()

std::vector< PndMvaClass > const & PndMvaClassifier::GetClasses ( ) const
inline

Get the list of available classes (labels).

Definition at line 86 of file PndMvaClassifier.h.

References PndMvaDataSet::GetClasses(), and m_dataSets.

87 {
88  return m_dataSets.GetClasses();
89 };
PndMvaDataSet m_dataSets
Data set. Holds event Weights.
std::vector< PndMvaClass > const & GetClasses() const
Get the list of available classes (labels).

◆ GetMvaValues()

virtual void PndMvaClassifier::GetMvaValues ( std::vector< float >  EvtData,
std::map< std::string, float > &  result 
)
pure virtual
Parameters
EvtDataEvent data to be classified.
resultClassification results. Currently the shortest distance for each class is stored in result.

Implemented in PndMultiClassBdtClassify, PndMultiClassMlpClassify, PndKnnClassify, PndPrzWindowClassify, PndStdKnnClassify, PndLVQClassify, and PndProjectedKNN.

◆ GetVariables()

std::vector< PndMvaVariable > const & PndMvaClassifier::GetVariables ( ) const
inline

Get the list of available variables.

Definition at line 92 of file PndMvaClassifier.h.

References PndMvaDataSet::GetVars(), and m_dataSets.

93 {
94  return m_dataSets.GetVars();
95 };
std::vector< PndMvaVariable > const & GetVars() const
Get the list of available variables.
PndMvaDataSet m_dataSets
Data set. Holds event Weights.

◆ Initialize()

virtual void PndMvaClassifier::Initialize ( )
virtual

◆ NormalizeEvent()

virtual void PndMvaClassifier::NormalizeEvent ( std::vector< float > &  EvtVector) const
protectedvirtual

Normalize the given event vector.

◆ SetAppType()

void PndMvaClassifier::SetAppType ( AppType  t)
inlineprotected

Definition at line 79 of file PndMvaClassifier.h.

References m_dataSets, and PndMvaDataSet::SetAppType().

80 {
82 };
void SetAppType(AppType t)
PndMvaDataSet m_dataSets
Data set. Holds event Weights.

Member Data Documentation

◆ m_dataSets

PndMvaDataSet PndMvaClassifier::m_dataSets
protected

Data set. Holds event Weights.

Definition at line 71 of file PndMvaClassifier.h.

Referenced by GetClasses(), GetVariables(), and SetAppType().


The documentation for this class was generated from the following file: