|
FairRoot/PandaRoot
|
!< Type definition of the neighbour list. More...
#include <PndKnnClassify.h>
Public Member Functions | |
| PndKnnClassify (std::string const &inputFile, std::vector< std::string > const &classNames, std::vector< std::string > const &varNames) | |
| virtual | ~PndKnnClassify () |
| Destructor. More... | |
| void | GetMvaValues (std::vector< float > eventData, std::map< std::string, float > &result) |
| std::string * | Classify (std::vector< float > EvtData) |
| void | SetEvtParam (float const scFact, double const weight) |
| void | SetKnn (size_t const N) |
| Set the number of neighbours. More... | |
| size_t | GetKnn () |
| Get the number of neighbours. More... | |
| virtual void | Initialize () |
| void | print () |
| DEBUG Produces a lot of output. More... | |
| 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 Types | |
| typedef std::list< std::pair < const TMVA::kNN::Node < TMVA::kNN::Event > *, float > > | ResList |
Private Member Functions | |
| PndKnnClassify (PndKnnClassify const &other) | |
| DEBUG. More... | |
| PndKnnClassify & | operator= (PndKnnClassify const &other) |
| void | InitKNN () |
| Type definition for the neighbours list. More... | |
Private Attributes | |
| size_t | m_knn |
| Number of required neighbours. More... | |
| float | m_ScaleFact |
| Scalefactor Default = 0.8. More... | |
| double | m_weight |
| Event weight. More... | |
| TMVA::kNN::ModulekNN * | m_module |
| std::map< std::string, size_t > | m_classIndices |
!< Type definition of the neighbour list.
KNN based classification alg. implementation.
Definition at line 28 of file PndKnnClassify.h.
|
private |
Definition at line 92 of file PndKnnClassify.h.
|
explicit |
Constructor.
| inputFile,: | File that holds the weights |
| classNames,: | Class names. |
| varNames,: | Variable names from which the feature vector is built. |
|
virtual |
Destructor.
|
private |
DEBUG.
|
virtual |
Given a feature vector describing the pattern. Classifies the pattern.
| EvtData | Input vector describing the pattern. |
Implements PndMvaClassifier.
|
inlineinherited |
Get the list of available classes (labels).
Definition at line 90 of file PndMvaClassifier.h.
References PndMvaDataSet::GetClasses(), and PndMvaClassifier::m_dataSets.
|
inline |
|
virtual |
Classification function.
| eventData,: | Feature vector of the current event. |
| result,: | Holds the normalized results of classification |
Implements PndMvaClassifier.
|
inlineinherited |
Get the list of available variables.
Definition at line 96 of file PndMvaClassifier.h.
References PndMvaDataSet::GetVars(), and PndMvaClassifier::m_dataSets.
|
virtual |
Initialize the needed internal and external data structures.
Reimplemented from PndMvaClassifier.
Referenced by PndPidMvaAssociatorTask::Init().
|
private |
Type definition for the neighbours list.
Initialize the KNN classifier.
|
protectedvirtualinherited |
Normalize the given event vector.
|
private |
|
inline |
DEBUG Produces a lot of output.
Definition at line 77 of file PndKnnClassify.h.
References m_module.
|
inlineprotectedinherited |
Definition at line 83 of file PndMvaClassifier.h.
References PndMvaClassifier::m_dataSets, and PndMvaDataSet::SetAppType().
|
inline |
Set the scalefactor and the event weight for KNN classifier.
| scFact | Scale factor. |
| weight | Events weight. |
Definition at line 106 of file PndKnnClassify.h.
References m_ScaleFact, and m_weight.
Referenced by PndPidMvaAssociatorTask::Init().
|
inline |
Set the number of neighbours.
Definition at line 112 of file PndKnnClassify.h.
References m_knn.
Referenced by PndPidMvaAssociatorTask::Init().
|
private |
Mapping between class names and their indices in the class vector.
Definition at line 102 of file PndKnnClassify.h.
|
protectedinherited |
Data set. Holds event Weights.
Definition at line 75 of file PndMvaClassifier.h.
Referenced by PndMvaClassifier::GetClasses(), PndMvaClassifier::GetVariables(), and PndMvaClassifier::SetAppType().
|
private |
Number of required neighbours.
Definition at line 94 of file PndKnnClassify.h.
|
private |
Definition at line 97 of file PndKnnClassify.h.
Referenced by print().
|
private |
Scalefactor Default = 0.8.
Definition at line 95 of file PndKnnClassify.h.
Referenced by SetEvtParam().
|
private |
1.8.5