26 #ifndef ROOT_TMVA_MethodKNN 27 #define ROOT_TMVA_MethodKNN 61 const TString& theOption =
"KNN");
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 AddWeightsXMLTo(void *parent) const
write weights to XML
void MakeClassSpecific(std::ostream &, const TString &) const
write specific classifier response
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
const std::vector< Double_t > getRMS(const kNN::List &rlist, const kNN::Event &event_knn) const
Get polynomial kernel radius.
void Init(void)
Initialization.
#define ClassDef(name, id)
Double_t GausKernel(const kNN::Event &event_knn, const kNN::Event &event, const std::vector< Double_t > &svec) const
Gaussian kernel.
Class that contains all the data information.
LDA fLDA
(untouched) events used for learning
Double_t PolnKernel(Double_t value) const
polynomial kernel
void WriteWeightsToStream(TFile &rf) const
save weights to ROOT file
Double_t GetMvaValue(Double_t *err=0, Double_t *errUpper=0)
Compute classifier response.
virtual ~MethodKNN(void)
destructor
Int_t fTreeOptDepth
Experimental feature for local knn analysis.
const Ranking * CreateRanking()
no ranking available
void GetHelpMessage() const
get help message text
void ReadWeightsFromXML(void *wghtnode)
Analysis of k-nearest neighbor.
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.
Abstract ClassifierFactory template that handles arbitrary types.
Double_t getKernelRadius(const kNN::List &rlist) 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