FairRoot/PandaRoot
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
PndProjectedKNN Class Reference

#include <PndProjectedKNN.h>

Inheritance diagram for PndProjectedKNN:
PndMvaClassifier

Public Member Functions

 PndProjectedKNN (std::string const &inputFile, std::vector< std::string > const &classNames, std::vector< std::string > const &varNames, std::vector< std::vector< std::string > > const &varCombinations)
 Constructor. More...
 
virtual ~PndProjectedKNN ()
 Destructor. More...
 
void GetMvaValues (std::vector< float > eventData, std::map< std::string, float > &result)
 Get pdf's. More...
 
std::string * Classify (std::vector< float > EvtData)
 Classify Current event. More...
 
void SetEvtParam (float const scFact, double const weight)
 Set params. More...
 
void SetKnn (unsigned int const val)
 Set number of neighbors. More...
 
void InitKNN ()
 Init classifiers. More...
 
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...
 

Private Member Functions

 PndProjectedKNN (PndProjectedKNN const &other)
 to avoid mistakes. More...
 
PndProjectedKNNoperator= (PndProjectedKNN const &other)
 
void destroy ()
 

Private Attributes

std::vector< std::vector
< std::string > > 
m_varCombinations
 
std::vector< std::pair
< PndKnnClassify
*, std::vector< int > * > > 
m_classifiers
 
float m_ScaleFact
 
double m_weight
 Scale factor. More...
 
unsigned int m_knn
 Weight. More...
 

Detailed Description

Definition at line 16 of file PndProjectedKNN.h.

Constructor & Destructor Documentation

PndProjectedKNN::PndProjectedKNN ( std::string const &  inputFile,
std::vector< std::string > const &  classNames,
std::vector< std::string > const &  varNames,
std::vector< std::vector< std::string > > const &  varCombinations 
)
explicit

Constructor.

virtual PndProjectedKNN::~PndProjectedKNN ( )
virtual

Destructor.

PndProjectedKNN::PndProjectedKNN ( PndProjectedKNN const &  other)
private

to avoid mistakes.

Member Function Documentation

std::string* PndProjectedKNN::Classify ( std::vector< float >  EvtData)
virtual

Classify Current event.

Implements PndMvaClassifier.

void PndProjectedKNN::destroy ( )
private
std::vector< PndMvaClass > const & PndMvaClassifier::GetClasses ( ) const
inlineinherited

Get the list of available classes (labels).

Definition at line 90 of file PndMvaClassifier.h.

References PndMvaDataSet::GetClasses(), and PndMvaClassifier::m_dataSets.

91 {
92  return m_dataSets.GetClasses();
93 };
PndMvaDataSet m_dataSets
Data set. Holds event Weights.
std::vector< PndMvaClass > const & GetClasses() const
Get the list of available classes (labels).
void PndProjectedKNN::GetMvaValues ( std::vector< float >  eventData,
std::map< std::string, float > &  result 
)
virtual

Get pdf's.

Implements PndMvaClassifier.

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

Get the list of available variables.

Definition at line 96 of file PndMvaClassifier.h.

References PndMvaDataSet::GetVars(), and PndMvaClassifier::m_dataSets.

97 {
98  return m_dataSets.GetVars();
99 };
PndMvaDataSet m_dataSets
Data set. Holds event Weights.
std::vector< PndMvaVariable > const & GetVars() const
Get the list of available variables.
virtual void PndMvaClassifier::Initialize ( )
virtualinherited
void PndProjectedKNN::InitKNN ( )

Init classifiers.

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

Normalize the given event vector.

PndProjectedKNN& PndProjectedKNN::operator= ( PndProjectedKNN const &  other)
private
void PndMvaClassifier::SetAppType ( AppType  t)
inlineprotectedinherited

Definition at line 83 of file PndMvaClassifier.h.

References PndMvaClassifier::m_dataSets, and PndMvaDataSet::SetAppType().

84 {
86 };
void SetAppType(AppType t)
PndMvaDataSet m_dataSets
Data set. Holds event Weights.
TTree * t
Definition: bump_analys.C:13
void PndProjectedKNN::SetEvtParam ( float const  scFact,
double const  weight 
)
inline

Set params.

Definition at line 62 of file PndProjectedKNN.h.

References m_ScaleFact, and m_weight.

63 {
64  m_ScaleFact = scFact;
65  m_weight = weight;
66 };
double m_weight
Scale factor.
void PndProjectedKNN::SetKnn ( unsigned int const  val)
inline

Set number of neighbors.

Definition at line 68 of file PndProjectedKNN.h.

References m_knn, and val.

69 {
70  m_knn = val;
71 };
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11
unsigned int m_knn
Weight.

Member Data Documentation

std::vector<std::pair<PndKnnClassify*, std::vector<int>*> > PndProjectedKNN::m_classifiers
private

Definition at line 54 of file PndProjectedKNN.h.

PndMvaDataSet PndMvaClassifier::m_dataSets
protectedinherited

Data set. Holds event Weights.

Definition at line 75 of file PndMvaClassifier.h.

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

unsigned int PndProjectedKNN::m_knn
private

Weight.

Definition at line 58 of file PndProjectedKNN.h.

Referenced by SetKnn().

float PndProjectedKNN::m_ScaleFact
private

Definition at line 56 of file PndProjectedKNN.h.

Referenced by SetEvtParam().

std::vector<std::vector<std::string> > PndProjectedKNN::m_varCombinations
private

Definition at line 51 of file PndProjectedKNN.h.

double PndProjectedKNN::m_weight
private

Scale factor.

Definition at line 57 of file PndProjectedKNN.h.

Referenced by SetEvtParam().


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