26 #ifndef ROOT_TMVA_ModulekNN 27 #define ROOT_TMVA_ModulekNN 57 typedef std::vector<VarType> VarVec;
86 void Print(std::ostream& os)
const;
97 typedef std::vector<TMVA::kNN::Event> EventVec;
98 typedef std::pair<const Node<Event> *, VarType> Elem;
99 typedef std::list<Elem> List;
107 typedef std::map<int, std::vector<Double_t> >
VarMap;
123 const EventVec& GetEventVec()
const;
125 const List& GetkNNList()
const;
126 const Event& GetkNNEvent()
const;
128 const VarMap& GetVarMap()
const;
130 const std::map<Int_t, Double_t>& GetMetric()
const;
133 void Print(std::ostream &os)
const;
139 void ComputeMetric(
UInt_t ifrac);
172 const VarType var2 =
GetVar(ivar);
173 return (var1 - var2) * (var1 - var2);
Event()
default constructor
RooCmdArg Optimize(Int_t flag=2)
Random number generator class based on M.
const List & GetkNNList() const
This file contains binary tree and global function template that searches tree for k-nearest neigbors...
VarType GetVar(UInt_t i) const
Double_t GetWeight() const
std::map< int, std::vector< Double_t > > VarMap
std::map< Int_t, Double_t > fVarScale
const std::map< Int_t, Double_t > & GetMetric() const
const VarVec & GetTargets() const
const EventVec & GetEventVec() const
void SetTargets(const VarVec &tvec)
VarType GetDist(VarType var, UInt_t ivar) const
VarType GetTgt(UInt_t i) const
const VarMap & GetVarMap() const
void Add(THist< DIMENSIONS, PRECISION_TO, STAT_TO... > &to, const THist< DIMENSIONS, PRECISION_FROM, STAT_FROM... > &from)
Add two histograms.
std::ostream & operator<<(std::ostream &os, const Event &event)
static TRandom3 & GetRndmThreadLocal()
UInt_t Find(std::list< std::pair< const Node< T > *, Float_t > > &nlist, const Node< T > *node, const T &event, UInt_t nfind)
ostringstream derivative to redirect and format output
const VarVec & GetVars() const
const Event & GetkNNEvent() const
Abstract ClassifierFactory template that handles arbitrary types.
std::map< Short_t, UInt_t > fCount