35 #ifndef ROOT_TMVA_MethodPDEFoam
36 #define ROOT_TMVA_MethodPDEFoam
77 const TString& theOption =
"PDEFoam");
118 virtual void Reset();
173 template<
typename T>
T Sqr(
T x)
const {
return x*
x; }
215 #endif // MethodPDEFoam_H
void Train(void)
Train PDE-Foam depending on the set options.
std::vector< Float_t > fXmax
The PDEFoam method is an extension of the PDERS method, which divides the multi-dimensional phase spa...
TString fTargetSelectionStr
virtual void Reset()
reset MethodPDEFoam:
Bool_t fFillFoamWithOrigWeights
This class is the abstract kernel interface for PDEFoam.
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...
Virtual base Class for all MVA method.
Ranking for variables in method (implementation)
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.
Class that contains all the data information.
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.
Implementation of PDEFoam.
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...
MethodPDEFoam(const TString &jobName, const TString &methodTitle, DataSetInfo &dsi, const TString &theOption="PDEFoam")
init PDEFoam objects
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...
void FillVariableNamesToFoam() const
store the variable names in all foams
void TrainSeparatedClassification(void)
Creation of 2 separated foams: one for signal events, one for background 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 ...
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.
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