/* ************************************** * KNN based classifier training class. * * Author: M.Babai@rug.nl * * LICENSE: * * Version 1.0 beta1. * * ************************************** */ #pragma once #ifndef PndKnnTrain_H #define PndKnnTrain_H // Standard C++ libraries #include #include #include // Root includes #include "TFile.h" #include "TTree.h" class PndKnnTrain{ public: //Constructors and destructor definitions /** * @param OutPut: File name to hold the weight values. * @param ClassNames: Class names for wich the classifier is * trained. * @param VarNames: Variable names creating the feature vector. */ PndKnnTrain(const char *OutPut, const std::vector& ClassNames, const std::vector& VarNames); /** * Class destructor */ virtual ~PndKnnTrain(); /** * Train the classifier * @param EvtData: Current event example. * @param cls: The class of the current example. */ void Train(const std::vector &EvtData, const std::string cls); //protected: private: //! Variables TFile *m_OutPutF;/**< Write the weights in this file. */ int m_numClass;/**< Number of classes. */ int m_numVars;/**< Dimension of the variables. */ std::vector m_SigTrees; std::vector< std::vector* > m_varContainer; std::vector m_ClassNames; }; #endif //end of interface definition