35 #ifndef ROOT_TMVA_MethodPDEFoam
36 #define ROOT_TMVA_MethodPDEFoam
44 #ifndef ROOT_TMVA_MethodBase
48 #ifndef ROOT_TMVA_PDEFoam
52 #ifndef ROOT_TMVA_PDEFoamDecisionTree
55 #ifndef ROOT_TMVA_PDEFoamEvent
58 #ifndef ROOT_TMVA_PDEFoamDiscriminant
61 #ifndef ROOT_TMVA_PDEFoamTarget
64 #ifndef ROOT_TMVA_PDEFoamMultiTarget
68 #ifndef ROOT_TMVA_PDEFoamDensityBase
71 #ifndef ROOT_TMVA_PDEFoamTargetDensity
74 #ifndef ROOT_TMVA_PDEFoamEventDensity
77 #ifndef ROOT_TMVA_PDEFoamDiscriminantDensity
80 #ifndef ROOT_TMVA_PDEFoamDecisionTreeDensity
84 #ifndef ROOT_TMVA_PDEFoamKernelBase
87 #ifndef ROOT_TMVA_PDEFoamKernelTrivial
90 #ifndef ROOT_TMVA_PDEFoamKernelLinN
93 #ifndef ROOT_TMVA_PDEFoamKernelGauss
109 const TString& theOption =
"PDEFoam",
152 virtual void Reset();
207 template<
typename T>
T Sqr(
T x)
const {
return x*
x; }
249 #endif // MethodPDEFoam_H
void Train(void)
Train PDE-Foam depending on the set options.
std::vector< Float_t > fXmax
TString fTargetSelectionStr
virtual void Reset()
reset MethodPDEFoam:
Bool_t fFillFoamWithOrigWeights
void GetNCuts(PDEFoamCell *cell, std::vector< UInt_t > &nCuts)
Fill in 'nCuts' the number of cuts made in every foam dimension, starting at the root cell 'cell'...
PDEFoam * InitFoam(TString, EFoamType, UInt_t cls=0)
Create a new PDEFoam, set the PDEFoam options (nCells, nBin, Xmin, Xmax, etc.) and initialize the PDE...
void PrintCoefficients(void)
Bool_t fMultiTargetRegression
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
void TrainUnifiedClassification(void)
Create only one unified foam (fFoam[0]) whose cells contain the average discriminator (N_sig)/(N_sig ...
UInt_t KernelToUInt(EKernel ker) const
#define ClassDef(name, id)
void GetHelpMessage() const
provide help message
void ReadWeightsFromStream(std::istream &i)
read options and internal parameters
virtual ~MethodPDEFoam(void)
destructor
void DeclareOptions()
Declare MethodPDEFoam options.
std::vector< Float_t > fXmin
void SetXminXmax(TMVA::PDEFoam *)
Set Xmin, Xmax for every dimension in the given pdefoam object.
PDEFoam * ReadClonedFoamFromFile(TFile *, const TString &)
Reads a foam with name 'foamname' from file, and returns a clone of the foam.
void WriteFoamsToFile() const
Write PDEFoams to file.
Double_t CalculateMVAError()
Calculate the error on the Mva value.
void Init(void)
default initialization called by all constructors
void CalcXminXmax()
Determine foam range [fXmin, fXmax] for all dimensions, such that a fraction of 'fFrac' events lie ou...
virtual Bool_t HasAnalysisType(Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets)
PDEFoam can handle classification with multiple classes and regression with one or more regression-ta...
UInt_t TargetSelectionToUInt(ETargetSelection ts) const
PDEFoamKernelBase * fKernelEstimator
EKernel UIntToKernel(UInt_t iker)
convert UInt_t to EKernel (used for reading weight files)
ETargetSelection UIntToTargetSelection(UInt_t its)
convert UInt_t to ETargetSelection (used for reading weight files)
Double_t GetMvaValue(Double_t *err=0, Double_t *errUpper=0)
Return Mva-Value.
void TrainMultiTargetRegression(void)
Training one (multi target regression) foam, whose cells contain the average event density...
MethodPDEFoam(const TString &jobName, const TString &methodTitle, DataSetInfo &dsi, const TString &theOption="PDEFoam", TDirectory *theTargetDir=0)
void FillVariableNamesToFoam() const
store the variable names in all foams
void TrainSeparatedClassification(void)
Creation of 2 separated foams: one for signal events, one for backgound events.
void ReadWeightsFromXML(void *wghtnode)
read PDEFoam variables from xml weight file
void TrainMultiClassification()
Create one unified foam (see TrainUnifiedClassification()) for each class, where the cells of foam i ...
Describe directory structure in memory.
std::vector< PDEFoam * > fFoam
PDEFoamKernelBase * CreatePDEFoamKernel()
create a pdefoam kernel estimator, depending on the current value of fKernel
void TrainMonoTargetRegression(void)
Training one (mono target regression) foam, whose cells contain the average 0th target.
const std::vector< Float_t > & GetMulticlassValues()
Get the multiclass MVA response for the PDEFoam classifier.
const Ranking * CreateRanking()
Compute ranking of input variables from the number of cuts made in each PDEFoam dimension.
Abstract ClassifierFactory template that handles arbitrary types.
void DeleteFoams()
Deletes all trained foams.
ETargetSelection fTargetSelection
EDTSeparation fDTSeparation
virtual const std::vector< Float_t > & GetRegressionValues()
Return regression values for both multi- and mono-target regression.
void ProcessOptions()
process user options
void MakeClassSpecific(std::ostream &, const TString &) const
write PDEFoam-specific classifier response NOT IMPLEMENTED YET!
virtual void ReadWeightsFromStream(std::istream &)=0
void DeclareCompatibilityOptions()
options that are used ONLY for the READER to ensure backward compatibility
void AddWeightsXMLTo(void *parent) const
create XML output of PDEFoam method variables
void ReadFoamsFromFile()
read foams from file