PandaRoot
PndKnnTrain Class Reference

#include <PndKnnTrain.h>

Inheritance diagram for PndKnnTrain:
PndMvaTrainer

Public Member Functions

 PndKnnTrain (std::string const &InputFile, std::vector< std::string > const &ClassNames, std::vector< std::string > const &VarNames, bool trim=true)
 
virtual ~PndKnnTrain ()
 
void Train ()
 
void storeWeights ()
 
- Public Member Functions inherited from PndMvaTrainer
 PndMvaTrainer (std::vector< std::pair< std::string, std::vector< float > *>> const &InputEvtsParam, std::vector< std::string > const &ClassNames, std::vector< std::string > const &VarNames, bool trim=true)
 
 PndMvaTrainer (std::string const &InPut, std::vector< std::string > const &ClassNames, std::vector< std::string > const &VarNames, bool trim=true)
 
virtual ~PndMvaTrainer ()
 Destructor. More...
 
void SetTestSetSize (size_t percent=50)
 
void SetTestSet (std::set< size_t > const &testSet)
 
void NormalizeData (NormType t=NONORM)
 
void PCATransForm ()
 
void SetOutPutFile (std::string const &outFile)
 
void WriteErroVect (std::string const &FileName) const
 
std::vector< StepError > const & GetErrorValues () const
 
virtual void Initialize ()
 
std::set< size_t > const & GetTestEvetIdx () const
 
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...
 
virtual void EvalClassifierError ()
 
size_t GetRndSeed () const
 
void SetRndSeed (size_t const sd)
 

Additional Inherited Members

- Protected Member Functions inherited from PndMvaTrainer
void SetAppType (AppType t)
 
void WriteToWeightFile (std::vector< std::pair< std::string, std::vector< float > *>> const &weights) const
 
void splitTetsSet ()
 
- Protected Attributes inherited from PndMvaTrainer
std::set< size_t > m_testSet_indices
 Indices of the test set. More...
 
PndMvaDataSet m_dataSets
 Data set. Holds event values. More...
 
std::vector< StepErrorm_StepErro
 Container to keep per step error values. More...
 
std::string m_outFile
 Output filename. More...
 
size_t m_RND_seed
 Random seed. More...
 

Detailed Description

Definition at line 15 of file PndKnnTrain.h.

Constructor & Destructor Documentation

◆ PndKnnTrain()

PndKnnTrain::PndKnnTrain ( std::string const &  InputFile,
std::vector< std::string > const &  ClassNames,
std::vector< std::string > const &  VarNames,
bool  trim = true 
)
explicit

Constructor.

Parameters
InputFileExample event input File name.
ClassNamesClass names for wich the classifier is trained.
VarNamesVariable names creating the feature vector.

◆ ~PndKnnTrain()

virtual PndKnnTrain::~PndKnnTrain ( )
virtual

Class destructor.

Member Function Documentation

◆ storeWeights()

void PndKnnTrain::storeWeights ( )
virtual

Store weights in the output File. If output file name is not specified, then write nothing.

Implements PndMvaTrainer.

◆ Train()

void PndKnnTrain::Train ( )
virtual

Train the classifier.

Implements PndMvaTrainer.


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