![]() |
ROOT 6.08/07 Reference Guide |
Definition at line 111 of file ModulekNN.h.
Public Types | |
typedef std::map< int, std::vector< Double_t > > | VarMap |
Public Member Functions | |
ModulekNN () | |
default constructor More... | |
~ModulekNN () | |
destructor More... | |
void | Add (const Event &event) |
add an event to tree More... | |
void | Clear () |
clean up More... | |
Bool_t | Fill (const UShort_t odepth, UInt_t ifrac, const std::string &option="") |
fill the tree More... | |
Bool_t | Find (Event event, UInt_t nfind=100, const std::string &option="count") const |
find in tree if tree has been filled then search for nfind closest events if metic (fVarScale map) is computed then rescale event variables using previsouly computed width of variable distribution More... | |
Bool_t | Find (UInt_t nfind, const std::string &option) const |
find in tree More... | |
const EventVec & | GetEventVec () const |
const Event & | GetkNNEvent () const |
const List & | GetkNNList () const |
const std::map< Int_t, Double_t > & | GetMetric () const |
const VarMap & | GetVarMap () const |
void | Print () const |
print More... | |
void | Print (std::ostream &os) const |
print More... | |
Private Member Functions | |
void | ComputeMetric (UInt_t ifrac) |
compute scale factor for each variable (dimension) so that distance is computed uniformely along each dimension compute width of interval that includes (100 - 2*ifrac)% of events below, assume that in fVar each vector of values is sorted More... | |
MsgLogger & | Log () const |
Node< Event > * | Optimize (UInt_t optimize_depth) |
Optimize() balances binary tree for first odepth levels for each depth we split sorted depth % dimension variables into 2^odepth parts. More... | |
const Event | Scale (const Event &event) const |
scale each event variable so that rms of variables is approximately 1.0 this allows comparisons of variables with distinct scales and units More... | |
Static Private Member Functions | |
static TRandom3 & | GetRndmThreadLocal () |
Private Attributes | |
std::map< Short_t, UInt_t > | fCount |
UInt_t | fDimn |
EventVec | fEvent |
Event | fkNNEvent |
List | fkNNList |
MsgLogger * | fLogger |
Node< Event > * | fTree |
VarMap | fVar |
std::map< Int_t, Double_t > | fVarScale |
#include <TMVA/ModulekNN.h>
typedef std::map<int, std::vector<Double_t> > TMVA::kNN::ModulekNN::VarMap |
Definition at line 115 of file ModulekNN.h.
TMVA::kNN::ModulekNN::ModulekNN | ( | ) |
default constructor
Definition at line 167 of file ModulekNN.cxx.
TMVA::kNN::ModulekNN::~ModulekNN | ( | ) |
destructor
Definition at line 177 of file ModulekNN.cxx.
add an event to tree
Definition at line 206 of file ModulekNN.cxx.
void TMVA::kNN::ModulekNN::Clear | ( | ) |
clean up
Definition at line 188 of file ModulekNN.cxx.
compute scale factor for each variable (dimension) so that distance is computed uniformely along each dimension compute width of interval that includes (100 - 2*ifrac)% of events below, assume that in fVar each vector of values is sorted
Definition at line 536 of file ModulekNN.cxx.
Bool_t TMVA::kNN::ModulekNN::Fill | ( | const UShort_t | odepth, |
UInt_t | ifrac, | ||
const std::string & | option = "" |
||
) |
fill the tree
Definition at line 239 of file ModulekNN.cxx.
Bool_t TMVA::kNN::ModulekNN::Find | ( | Event | event, |
UInt_t | nfind = 100 , |
||
const std::string & | option = "count" |
||
) | const |
find in tree if tree has been filled then search for nfind closest events if metic (fVarScale map) is computed then rescale event variables using previsouly computed width of variable distribution
Definition at line 342 of file ModulekNN.cxx.
find in tree
Definition at line 387 of file ModulekNN.cxx.
|
inline |
Definition at line 220 of file ModulekNN.h.
|
inline |
Definition at line 216 of file ModulekNN.h.
|
inline |
Definition at line 212 of file ModulekNN.h.
Definition at line 228 of file ModulekNN.h.
|
inlinestaticprivate |
Definition at line 155 of file ModulekNN.h.
|
inline |
Definition at line 224 of file ModulekNN.h.
|
inlineprivate |
Definition at line 172 of file ModulekNN.h.
|
private |
Optimize() balances binary tree for first odepth levels for each depth we split sorted depth % dimension variables into 2^odepth parts.
Definition at line 443 of file ModulekNN.cxx.
void TMVA::kNN::ModulekNN::Print | ( | ) | const |
Definition at line 656 of file ModulekNN.cxx.
void TMVA::kNN::ModulekNN::Print | ( | std::ostream & | os | ) | const |
Definition at line 664 of file ModulekNN.cxx.
|
private |
scale each event variable so that rms of variables is approximately 1.0 this allows comparisons of variables with distinct scales and units
Definition at line 622 of file ModulekNN.cxx.
Definition at line 166 of file ModulekNN.h.
|
private |
Definition at line 155 of file ModulekNN.h.
|
private |
Definition at line 168 of file ModulekNN.h.
|
mutableprivate |
Definition at line 164 of file ModulekNN.h.
|
mutableprivate |
Definition at line 163 of file ModulekNN.h.
|
mutableprivate |
Definition at line 171 of file ModulekNN.h.
Definition at line 159 of file ModulekNN.h.
|
private |
Definition at line 169 of file ModulekNN.h.
Definition at line 161 of file ModulekNN.h.