!< Type definition of the neighbour list.
More...
#include <PndKnnClassify.h>
!< Type definition of the neighbour list.
KNN based classification alg. implementation.
Definition at line 28 of file PndKnnClassify.h.
◆ PndKnnClassify()
PndKnnClassify::PndKnnClassify |
( |
std::string const & |
inputFile, |
|
|
std::vector< std::string > const & |
classNames, |
|
|
std::vector< std::string > const & |
varNames |
|
) |
| |
|
explicit |
Constructor.
- Parameters
-
inputFile | File that holds the weights |
classNames | Class names. |
varNames | Variable names from which the feature vector is built. |
Referenced by print().
◆ ~PndKnnClassify()
virtual PndKnnClassify::~PndKnnClassify |
( |
| ) |
|
|
virtual |
◆ Classify()
std::string* PndKnnClassify::Classify |
( |
std::vector< float > |
EvtData | ) |
|
|
virtual |
Given a feature vector describing the pattern. Classifies the pattern.
- Parameters
-
EvtData | Input vector describing the pattern. |
- Returns
- The name of the class to which the current pattern is assigned.
Implements PndMvaClassifier.
◆ GetKnn()
size_t PndKnnClassify::GetKnn |
( |
| ) |
|
|
inline |
◆ GetMvaValues()
void PndKnnClassify::GetMvaValues |
( |
std::vector< float > |
eventData, |
|
|
std::map< std::string, float > & |
result |
|
) |
| |
|
virtual |
Classification function.
- Parameters
-
eventData | Feature vector of the current event. |
result | Holds the normalized results of classification |
Implements PndMvaClassifier.
◆ Initialize()
virtual void PndKnnClassify::Initialize |
( |
| ) |
|
|
virtual |
Initialize the needed internal and external data structures.
Reimplemented from PndMvaClassifier.
◆ print()
void PndKnnClassify::print |
( |
| ) |
|
|
inline |
◆ SetEvtParam()
void PndKnnClassify::SetEvtParam |
( |
float const |
scFact, |
|
|
double const |
weight |
|
) |
| |
|
inline |
Set the scalefactor and the event weight for KNN classifier.
- Parameters
-
scFact | Scale factor. |
weight | Events weight. |
Definition at line 102 of file PndKnnClassify.h.
104 m_ScaleFact = scFact;
◆ SetKnn()
void PndKnnClassify::SetKnn |
( |
size_t const |
N | ) |
|
|
inline |
The documentation for this class was generated from the following file: