38#ifndef ROOT_TMVA_MethodPDERS
39#define ROOT_TMVA_MethodPDERS
79 void Train(
void )
override;
209 void RRScalc (
const Event&, std::vector<Float_t>* count );
219 void Init(
void )
override;
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
float Float_t
Float 4 bytes (float).
#define ClassDefOverride(name, id)
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
Node for the BinarySearch or Decision Trees.
A simple Binary search tree including a volume search method.
Class that contains all the data information.
MethodBase(const TString &jobName, Types::EMVA methodType, const TString &methodTitle, DataSetInfo &dsi, const TString &theOption="")
standard constructor
void ReadWeightsFromXML(void *wghtnode) override
void DeclareOptions() override
define the options (their key words) that can be set in the option string.
void GetHelpMessage() const override
get help message text
void WriteWeightsToStream(TFile &rf) const
write training sample (TTree) to file
static MethodPDERS *& GetMethodPDERSThreadLocal()
void CreateBinarySearchTree(Types::ETreeType type)
create binary search trees for signal and background
BinarySearchTree * fBinaryTree
binary tree
std::vector< Float_t > * fDelta
size of volume
void MakeClassSpecific(std::ostream &, const TString &) const override
write specific classifier response
virtual ~MethodPDERS(void)
destructor
Int_t fkNNMin
min number of events in kNN tree
Bool_t fInitializedVolumeEle
is volume element initialized ?
MethodPDERS(const TString &jobName, const TString &methodTitle, DataSetInfo &theData, const TString &theOption)
standard constructor for the PDERS method
Float_t fDeltaFrac
fraction of RMS
void GetSample(const Event &e, std::vector< const BinarySearchTreeNode * > &events, Volume *volume)
void ReadWeightsFromStream(std::istream &istr) override
read weight info from file
Double_t fMax_distance
maximum distance
void ProcessOptions() override
process the options specified by the user
Double_t fGaussSigma
size of Gauss in adaptive volume
@ kSinc3
the sinc enumerators must be consecutive and in order!
void AddWeightsXMLTo(void *parent) const override
write weights to xml file
Float_t GetError(Float_t countS, Float_t countB, Float_t sumW2S, Float_t sumW2B) const
statistical error estimate for RS estimator
BinarySearchTree * GetBinaryTree(void) const
static MethodPDERS * ThisPDERS(void)
static pointer to this object
Double_t GetMvaValue(Double_t *err=nullptr, Double_t *errUpper=nullptr) override
init the size of a volume element using a defined fraction of the volume containing the entire events
void Train(void) override
this is a dummy training: the preparation work to do is the construction of the binary tree as a poin...
Double_t KernelNormalization(Double_t pdf)
Calculating the normalization factor only once (might need a reset at some point.
std::vector< Float_t > fAverageRMS
average RMS of signal and background
Int_t fkNNMax
max number of events in kNN tree
Float_t fNEventsMax
maximum number of events in adaptive volume
Float_t fScaleS
weight for signal events
Float_t fInitialScale
initial scale for adaptive volume
void RRScalc(const Event &, std::vector< Float_t > *count)
void UpdateThis()
update static this pointer
Double_t CRScalc(const Event &)
Float_t fScaleB
weight for background events
Double_t fGaussSigmaNorm
size of Gauss in adaptive volume (normalised to dimensions)
std::vector< Float_t > * fShift
volume center
void Init(void) override
default initialisation routine called by all constructors
void CalcAverages()
compute also average RMS values required for adaptive Gaussian
enum TMVA::MethodPDERS::EVolumeRangeMode fVRangeMode
void RKernelEstimate(const Event &, std::vector< const BinarySearchTreeNode * > &, Volume &, std::vector< Float_t > *pdfSum)
normalization factors so we can work with radius 1 hyperspheres
enum TMVA::MethodPDERS::EKernelEstimator fKernelEstimator
Double_t NormSinc(Double_t x)
NormSinc.
void SetVolumeElement(void)
defines volume dimensions
const std::vector< Float_t > & GetRegressionValues() override
Double_t LanczosFilter(Int_t level, Double_t x)
Lanczos Filter.
Bool_t HasAnalysisType(Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets) override
PDERS can handle classification with 2 classes and regression with one or more regression-targets.
Double_t CKernelEstimate(const Event &, std::vector< const BinarySearchTreeNode * > &, Volume &)
normalization factors so we can work with radius 1 hyperspheres
Float_t fMaxVIterations
maximum number of iterations to adapt volume size
Double_t ApplyKernelFunction(Double_t normalized_distance)
from the normalized euclidean distance calculate the distance for a certain kernel
Bool_t fNormTree
binary-search tree is normalised
Double_t GetNormalizedDistance(const TMVA::Event &base_event, const BinarySearchTreeNode &sample_event, Double_t *dim_normalization)
We use Euclidian metric here. Might not be best or most efficient.
static Double_t IGetVolumeContentForRoot(Double_t)
Interface to RootFinder.
const Ranking * CreateRanking() override
Float_t fNEventsMin
minimum number of events in adaptive volume
Double_t GetVolumeContentForRoot(Double_t)
count number of events in rescaled volume
Ranking for variables in method (implementation).
Volume for BinarySearchTree.
create variable transformations