26 #ifndef ROOT_TMVA_MethodKNN
27 #define ROOT_TMVA_MethodKNN
61 const TString& theOption =
"KNN");
109 Double_t GausKernel(
const kNN::Event &event_knn,
const kNN::Event &event,
const std::vector<Double_t> &svec)
const;
112 const std::vector<Double_t>
getRMS(
const kNN::List &rlist,
const kNN::Event &event_knn)
const;
void ProcessOptions()
process the options specified by the user
void DeclareOptions()
MethodKNN options.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
void Train(void)
kNN training
Virtual base Class for all MVA method.
void MakeKNN(void)
create kNN
Ranking for variables in method (implementation)
void DeclareCompatibilityOptions()
options that are used ONLY for the READER to ensure backward compatibility
void ReadWeightsFromStream(std::istream &istr)
read the weights
void Init(void)
Initialization.
#define ClassDef(name, id)
Double_t PolnKernel(Double_t value) const
polynomial kernel
void WriteWeightsToStream(TFile &rf) const
save weights to ROOT file
Class that contains all the data information.
LDA fLDA
(untouched) events used for learning
void MakeClassSpecific(std::ostream &, const TString &) const
write specific classifier response
Double_t GetMvaValue(Double_t *err=0, Double_t *errUpper=0)
Compute classifier response.
Double_t GausKernel(const kNN::Event &event_knn, const kNN::Event &event, const std::vector< Double_t > &svec) const
Gaussian kernel.
This file contains binary tree and global function template that searches tree for k-nearest neigbors...
virtual ~MethodKNN(void)
destructor
Int_t fTreeOptDepth
Experimental feature for local knn analysis.
const Ranking * CreateRanking()
no ranking available
void ReadWeightsFromXML(void *wghtnode)
Analysis of k-nearest neighbor.
void AddWeightsXMLTo(void *parent) const
write weights to XML
std::vector< TMVA::kNN::Event > EventVec
virtual Bool_t HasAnalysisType(Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets)
FDA can handle classification with 2 classes and regression with one regression-target.
void GetHelpMessage() const
get help message text
const std::vector< Double_t > getRMS(const kNN::List &rlist, const kNN::Event &event_knn) const
Get polynomial kernel radius.
virtual void ReadWeightsFromStream(std::istream &)=0
const std::vector< Float_t > & GetRegressionValues()
Return vector of averages for target values of k-nearest neighbors.
MethodKNN(const TString &jobName, const TString &methodTitle, DataSetInfo &theData, const TString &theOption="KNN")
standard constructor
double getLDAValue(const kNN::List &rlist, const kNN::Event &event_knn)
Int_t fnkNN
module where all work is done
Double_t getKernelRadius(const kNN::List &rlist) const
Get polynomial kernel radius.