29#ifndef ROOT_TMVA_DataSet
30#define ROOT_TMVA_DataSet
143 std::vector< std::map< TString, Results* > >
fResults;
196 switch (fCurrentTreeIdx) {
209 if (fSampling.size() >
UInt_t(treeIdx) && fSampling.at(treeIdx)) {
210 return fSamplingSelected.at(treeIdx).size();
212 return GetEventCollection(
type).size();
218 return fEventCollection.at(TreeIndex(
type));
#define ClassDef(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Class that contains all the data information.
Class that contains all the data information.
void DivideTrainingSet(UInt_t blockNum)
divide training set
const DataSetInfo * fdsi
-> datasetinfo that created this dataset
void AddEvent(Event *, Types::ETreeType)
add event to event list after which the event is owned by the dataset
Long64_t GetNEvtSigTest()
return number of signal test events in dataset
std::vector< Char_t > fSampling
random or importance sampling (not all events are taken) !! Bool_t are stored ( no std::vector<bool> ...
std::vector< std::vector< std::pair< Float_t, Long64_t > > > fSamplingEventList
weights and indices for sampling
std::vector< Float_t > fSamplingWeight
weight change factor [weight is indicating if sampling is random (1.0) or importance (<1....
UInt_t GetNTargets() const
access the number of targets through the datasetinfo
void ClearNClassEvents(Int_t type)
Long64_t GetNEvtSigTrain()
return number of signal training events in dataset
void EventResult(Bool_t successful, Long64_t evtNumber=-1)
increase the importance sampling weight of the event when not successful and decrease it when success...
std::vector< std::map< TString, Results * > > fResults
! [train/test/...][method-identifier]
void SetEventCollection(std::vector< Event * > *, Types::ETreeType, Bool_t deleteEvents=true)
Sets the event collection (by DataSetFactory)
Long64_t GetNTestEvents() const
TTree * GetTree(Types::ETreeType type)
create the test/trainings tree with all the variables, the weights, the classes, the targets,...
const Event * GetEvent() const
returns event without transformations
Types::ETreeType GetCurrentType() const
Long64_t GetNEvents(Types::ETreeType type=Types::kMaxTreeType) const
Results * GetResults(const TString &, Types::ETreeType type, Types::EAnalysisType analysistype)
Long64_t GetNClassEvents(Int_t type, UInt_t classNumber)
Long64_t fCurrentEventIdx
std::vector< Char_t > fBlockBelongToTraining
when dividing the dataset to blocks, sets whether the certain block is in the Training set or else in...
MsgLogger * fLogger
! message logger
Long64_t GetNTrainingEvents() const
UInt_t GetNSpectators() const
access the number of targets through the datasetinfo
void MoveTrainingBlock(Int_t blockInd, Types::ETreeType dest, Bool_t applyChanges=kTRUE)
move training block
UInt_t GetNVariables() const
access the number of variables through the datasetinfo
const Event * GetTestEvent(Long64_t ievt) const
std::vector< Int_t > fSamplingNEvents
number of events which should be sampled
std::vector< std::vector< std::pair< Float_t, Long64_t > > > fSamplingSelected
selected events
virtual ~DataSet()
destructor
std::vector< std::vector< Long64_t > > fClassEvents
number of events of class 0,1,2,... in training[0] and testing[1] (+validation, trainingoriginal)
void DeleteAllResults(Types::ETreeType type, Types::EAnalysisType analysistype)
Deletes all results currently in the dataset.
void ApplyTrainingBlockDivision()
void InitSampling(Float_t fraction, Float_t weight, UInt_t seed=0)
initialize random or importance sampling
const Event * GetEvent(Long64_t ievt, Types::ETreeType type) const
UInt_t TreeIndex(Types::ETreeType type) const
void IncrementNClassEvents(Int_t type, UInt_t classNumber)
void DeleteResults(const TString &, Types::ETreeType type, Types::EAnalysisType analysistype)
delete the results stored for this particular Method instance.
Bool_t fHasNegativeEventWeights
true if at least one signal or bkg event has negative weight
Long64_t fTrainingBlockSize
block size into which the training dataset is divided
void CreateSampling() const
create an event sampling (random or importance sampling)
const TTree * GetEventCollectionAsTree()
std::vector< std::vector< Event * > > fEventCollection
list of events for training/testing/...
void SetCurrentType(Types::ETreeType type) const
TRandom3 * fSamplingRandom
-> random generator for sampling
const Event * GetEvent(Long64_t ievt) const
const std::vector< Event * > & GetEventCollection(Types::ETreeType type=Types::kMaxTreeType) const
void SetCurrentEvent(Long64_t ievt) const
Long64_t GetNEvtBkgdTrain()
return number of background training events in dataset
void DestroyCollection(Types::ETreeType type, Bool_t deleteEvents)
destroys the event collection (events + vector)
void ApplyTrainingSetDivision()
apply division of data set
const Event * GetTrainingEvent(Long64_t ievt) const
Bool_t HasNegativeEventWeights() const
Long64_t GetNEvtBkgdTest()
return number of background test events in dataset
ostringstream derivative to redirect and format output
Class that is the base-class for a vector of result.
@ kMaxTreeType
also used as temporary storage for trees not yet assigned for testing;training...
@ kTrainingOriginal
ever needed
@ kValidation
these are placeholders... currently not used, but could be moved "forward" if
The TNamed class is the base class for all named ROOT classes.
Random number generator class based on M.
A TTree represents a columnar dataset.
create variable transformations
#define dest(otri, vertexptr)