26#ifndef ROOT_TMVA_MethodKNN
27#define ROOT_TMVA_MethodKNN
#define ClassDef(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
Class that contains all the data information.
Virtual base Class for all MVA method.
virtual void ReadWeightsFromStream(std::istream &)=0
Analysis of k-nearest neighbor.
void Init(void)
Initialization.
Int_t fBalanceDepth
number of binary tree levels used for balancing tree
void MakeKNN(void)
create kNN
TString fKernel
="Gaus","Poln" - kernel type for smoothing
Float_t fScaleFrac
fraction of events used to compute variable width
virtual ~MethodKNN(void)
destructor
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.
const std::vector< Double_t > getRMS(const kNN::List &rlist, const kNN::Event &event_knn) const
Get polynomial kernel radius.
const Ranking * CreateRanking()
no ranking available
Int_t fTreeOptDepth
number of binary tree levels used for optimization
Double_t fSumOfWeightsS
sum-of-weights for signal training events
void MakeClassSpecific(std::ostream &, const TString &) const
write specific classifier response
MethodKNN(const TString &jobName, const TString &methodTitle, DataSetInfo &theData, const TString &theOption="KNN")
standard constructor
void DeclareCompatibilityOptions()
options that are used ONLY for the READER to ensure backward compatibility
Double_t getKernelRadius(const kNN::List &rlist) const
Get polynomial kernel radius.
void GetHelpMessage() const
get help message text
const std::vector< Float_t > & GetRegressionValues()
Return vector of averages for target values of k-nearest neighbors.
Double_t fSumOfWeightsB
sum-of-weights for background training events
kNN::EventVec fEvent
! (untouched) events used for learning
void Train(void)
kNN training
void ReadWeightsFromStream(std::istream &istr)
read the weights
double getLDAValue(const kNN::List &rlist, const kNN::Event &event_knn)
Double_t PolnKernel(Double_t value) const
polynomial kernel
void ProcessOptions()
process the options specified by the user
void ReadWeightsFromXML(void *wghtnode)
void AddWeightsXMLTo(void *parent) const
write weights to XML
kNN::ModulekNN * fModule
! module where all work is done
Bool_t fUseLDA
use local linear discriminant analysis to compute MVA
Float_t fSigmaFact
scale factor for Gaussian sigma in Gaus. kernel
Bool_t fTrim
set equal number of signal and background events
Double_t GetMvaValue(Double_t *err=nullptr, Double_t *errUpper=nullptr)
Compute classifier response.
Bool_t fUseWeight
use weights to count kNN
Bool_t fUseKernel
use polynomial kernel weight function
void DeclareOptions()
MethodKNN options.
void WriteWeightsToStream(TFile &rf) const
save weights to ROOT file
LDA fLDA
! Experimental feature for local knn analysis
Double_t GausKernel(const kNN::Event &event_knn, const kNN::Event &event, const std::vector< Double_t > &svec) const
Gaussian kernel.
Int_t fnkNN
number of k-nearest neighbors
Ranking for variables in method (implementation)
kNN::Event describes point in input variable vector-space, with additional functionality like distanc...
std::vector< TMVA::kNN::Event > EventVec
create variable transformations