29 #ifndef ROOT_TMVA_DataSetFactory
30 #define ROOT_TMVA_DataSetFactory
59 class DataInputHandler;
98 template<
typename T >
110 template <
typename F>
123 template <
typename F>
130 template <
typename F,
typename G,
typename H>
132 typename H::argument_type,
133 typename F::result_type>
144 typename F::result_type
operator()(
const typename G::argument_type& argG,
145 const typename H::argument_type& argH)
const
147 return f(
g(argG),
h(argH));
151 template <
typename F,
typename G,
typename H>
159 template <
typename F,
typename G>
161 typename F::result_type>
171 typename F::result_type
operator()(
const typename G::argument_type& argG)
const
177 template <
typename F,
typename G>
void ResetBranchAndEventAddresses(TTree *)
std::vector< EventVector > EventVectorOfClasses
Random number generator class based on M.
std::vector< TTreeFormula * > fInputFormulas
Float_t cutScaling() const
std::vector< TTreeFormula * > fCutFormulas
std::vector< Double_t > ValuePerClass
F operator()(const F &argF) const
virtual void SetSeed(ULong_t seed=0)
Set the random generator sequence if seed is 0 (default value) a TUUID is generated and used to fill ...
compose_unary_t< F, G > compose_unary(const F &_f, const G &_g)
F::result_type operator()(const typename G::argument_type &argG, const typename H::argument_type &argH) const
void BuildEventVector(DataSetInfo &dsi, DataInputHandler &dataInput, EventVectorOfClassesOfTreeType &eventsmap, EvtStatsPerClass &eventCounts)
build empty event vectors distributes events between kTraining/kTesting/kMaxTreeType ...
compose_unary_t(const F &_f, const G &_g)
void CalcMinMax(DataSet *, DataSetInfo &dsi)
compute covariance matrix
DeleteFunctor_t & operator()(const T *p)
compose_binary_t(const F &_f, const G &_g, const H &_h)
std::vector< int > NumberPerClass
Int_t nTestingEventsRequested
std::map< Types::ETreeType, EventVectorOfClasses > EventVectorOfClassesOfTreeType
void InitOptions(DataSetInfo &dsi, EvtStatsPerClass &eventsmap, TString &normMode, UInt_t &splitSeed, TString &splitMode, TString &mixMode)
the dataset splitting
DataSet * BuildDynamicDataSet(DataSetInfo &)
#define ClassDef(name, id)
std::vector< TTreeFormula * > fWeightFormula
F::result_type operator()(const typename G::argument_type &argG) const
virtual UInt_t Integer(UInt_t imax)
Returns a random integer on [ 0, imax-1 ].
MsgLogger & Log() const
message logger
void RenormEvents(DataSetInfo &dsi, EventVectorOfClassesOfTreeType &eventsmap, const EvtStatsPerClass &eventCounts, const TString &normMode)
renormalisation of the TRAINING event weights
Class that contains all the data information.
DeleteFunctor_t< const T > DeleteFunctor()
Class that contains all the data information.
void ChangeToNewTree(TreeInfo &, const DataSetInfo &)
While the data gets copied into the local training and testing trees, the input tree can change (for ...
Class that contains all the data information.
DataSetFactory()
constructor
TMatrixD * CalcCorrelationMatrix(DataSet *, const UInt_t classNumber)
computes correlation matrix for variables "theVars" in tree; "theType" defines the required event "ty...
Bool_t fScaleWithPreselEff
std::vector< TTreeFormula * > fSpectatorFormulas
DataSet * CreateDataSet(DataSetInfo &, DataInputHandler &)
steering the creation of a new dataset
UInt_t operator()(UInt_t n)
std::vector< TTreeFormula * > fTargetFormulas
std::vector< Event * > EventVector
Float_t TrainTestSplitRequested
DataSet * BuildInitialDataSet(DataSetInfo &, TMVA::DataInputHandler &)
if no entries, than create a DataSet with one Event which uses dynamic variables (pointers to variabl...
~DataSetFactory()
destructor
RandomGenerator(UInt_t seed)
compose_binary_t< F, G, H > compose_binary(const F &_f, const G &_g, const H &_h)
std::map< Types::ETreeType, EventVector > EventVectorOfTreeType
ostringstream derivative to redirect and format output
Mother of all ROOT objects.
std::vector< EventStats > EvtStatsPerClass
Bool_t CheckTTreeFormula(TTreeFormula *ttf, const TString &expression, Bool_t &hasDollar)
checks a TTreeFormula for problems
Int_t nTrainingEventsRequested
A TTree object has a header with a name and a title.
DataSet * MixEvents(DataSetInfo &dsi, EventVectorOfClassesOfTreeType &eventsmap, EvtStatsPerClass &eventCounts, const TString &splitMode, const TString &mixMode, const TString &normMode, UInt_t splitSeed)
Select and distribute unassigned events to kTraining and kTesting.
std::map< Types::ETreeType, ValuePerClass > ValuePerClassOfTreeType
TMatrixD * CalcCovarianceMatrix(DataSet *, const UInt_t classNumber)
compute covariance matrix