26#ifndef ROOT_TMVA_MethodKNN
27#define ROOT_TMVA_MethodKNN
69 void Train(
void )
override;
101 void Init(
void )
override;
float Float_t
Float 4 bytes (float)
#define ClassDefOverride(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.
void ReadWeightsFromStream(std::istream &) override=0
Analysis of k-nearest neighbor.
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
const std::vector< Double_t > getRMS(const kNN::List &rlist, const kNN::Event &event_knn) const
Get polynomial kernel radius.
const Ranking * CreateRanking() override
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 DeclareOptions() override
MethodKNN options.
MethodKNN(const TString &jobName, const TString &methodTitle, DataSetInfo &theData, const TString &theOption="KNN")
standard constructor
Double_t getKernelRadius(const kNN::List &rlist) const
Get polynomial kernel radius.
void Train(void) override
kNN training
Double_t fSumOfWeightsB
sum-of-weights for background training events
kNN::EventVec fEvent
! (untouched) events used for learning
double getLDAValue(const kNN::List &rlist, const kNN::Event &event_knn)
void ProcessOptions() override
process the options specified by the user
Double_t PolnKernel(Double_t value) const
polynomial kernel
void DeclareCompatibilityOptions() override
options that are used ONLY for the READER to ensure backward compatibility
void ReadWeightsFromStream(std::istream &istr) override
read the weights
void GetHelpMessage() const override
get help message text
kNN::ModulekNN * fModule
! module where all work is done
Bool_t fUseLDA
use local linear discriminant analysis to compute MVA
void MakeClassSpecific(std::ostream &, const TString &) const override
write specific classifier response
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) override
Compute classifier response.
Bool_t HasAnalysisType(Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets) override
FDA can handle classification with 2 classes and regression with one regression-target.
Bool_t fUseWeight
use weights to count kNN
Bool_t fUseKernel
use polynomial kernel weight function
void Init(void) override
Initialization.
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.
void ReadWeightsFromXML(void *wghtnode) override
const std::vector< Float_t > & GetRegressionValues() override
Return vector of averages for target values of k-nearest neighbors.
Int_t fnkNN
number of k-nearest neighbors
void AddWeightsXMLTo(void *parent) const override
write weights to XML
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