Belle II Software development
|
Abstract base class of all Datasets given to the MVA interface The current event can always be accessed via the public members of this class. More...
#include <Dataset.h>
Public Member Functions | |
Dataset (const GeneralOptions &general_options) | |
Constructs a new dataset given the general options. | |
virtual | ~Dataset ()=default |
Virtual default destructor. | |
Dataset (const Dataset &)=delete | |
Specify no copy constructor. | |
Dataset & | operator= (const Dataset &)=delete |
Specify no assignment operator. | |
virtual unsigned int | getNumberOfFeatures () const =0 |
Returns the number of features in this dataset. | |
virtual unsigned int | getNumberOfSpectators () const =0 |
Returns the number of spectators in this dataset. | |
virtual unsigned int | getNumberOfEvents () const =0 |
Returns the number of events in this dataset. | |
virtual void | loadEvent (unsigned int iEvent)=0 |
Load the event number iEvent. | |
virtual float | getSignalFraction () |
Returns the signal fraction of the whole sample. | |
virtual unsigned int | getFeatureIndex (const std::string &feature) |
Return index of feature with the given name. | |
virtual unsigned int | getSpectatorIndex (const std::string &spectator) |
Return index of spectator with the given name. | |
virtual std::vector< float > | getFeature (unsigned int iFeature) |
Returns all values of one feature in a std::vector<float> | |
virtual std::vector< float > | getSpectator (unsigned int iSpectator) |
Returns all values of one spectator in a std::vector<float> | |
virtual std::vector< float > | getWeights () |
Returns all weights. | |
virtual std::vector< float > | getTargets () |
Returns all targets. | |
virtual std::vector< bool > | getSignals () |
Returns all is Signals. | |
Public Attributes | |
GeneralOptions | m_general_options |
GeneralOptions passed to this dataset. | |
std::vector< float > | m_input |
Contains all feature values of the currently loaded event. | |
std::vector< float > | m_spectators |
Contains all spectators values of the currently loaded event. | |
float | m_weight |
Contains the weight of the currently loaded event. | |
float | m_target |
Contains the target value of the currently loaded event. | |
bool | m_isSignal |
Defines if the currently loaded event is signal or background. | |
Abstract base class of all Datasets given to the MVA interface The current event can always be accessed via the public members of this class.
|
explicit |
Constructs a new dataset given the general options.
general_options | which defines e.g. number of variables |
Definition at line 26 of file Dataset.cc.
|
virtual |
Returns all values of one feature in a std::vector<float>
iFeature | the position of the feature to return |
Reimplemented in SingleDataset, SubDataset, CombinedDataset, ROOTDataset, RegressionDataSet, ReweightingDataset, and SidebandDataset.
Definition at line 74 of file Dataset.cc.
|
virtual |
Return index of feature with the given name.
feature | name of the feature |
Definition at line 50 of file Dataset.cc.
|
pure virtual |
Returns the number of events in this dataset.
Implemented in SingleDataset, MultiDataset, SubDataset, CombinedDataset, ROOTDataset, RegressionDataSet, ReweightingDataset, SidebandDataset, and SPlotDataset.
|
pure virtual |
Returns the number of features in this dataset.
Implemented in SingleDataset, MultiDataset, SubDataset, CombinedDataset, ROOTDataset, RegressionDataSet, ReweightingDataset, SidebandDataset, and SPlotDataset.
|
pure virtual |
Returns the number of spectators in this dataset.
Implemented in SingleDataset, MultiDataset, SubDataset, CombinedDataset, ROOTDataset, RegressionDataSet, ReweightingDataset, SidebandDataset, and SPlotDataset.
|
virtual |
Returns the signal fraction of the whole sample.
Reimplemented in SPlotDataset.
Definition at line 35 of file Dataset.cc.
|
virtual |
Returns all is Signals.
Reimplemented in ReweightingDataset.
Definition at line 122 of file Dataset.cc.
|
virtual |
Returns all values of one spectator in a std::vector<float>
iSpectator | the position of the feature to return |
Reimplemented in SingleDataset, SubDataset, CombinedDataset, ROOTDataset, RegressionDataSet, ReweightingDataset, and SidebandDataset.
Definition at line 86 of file Dataset.cc.
|
virtual |
Return index of spectator with the given name.
spectator | name of the spectator |
Definition at line 62 of file Dataset.cc.
|
virtual |
Returns all targets.
Reimplemented in RegressionDataSet, and ReweightingDataset.
Definition at line 110 of file Dataset.cc.
|
virtual |
Returns all weights.
Reimplemented in ROOTDataset, RegressionDataSet, and ReweightingDataset.
Definition at line 98 of file Dataset.cc.
|
pure virtual |
Load the event number iEvent.
iEvent | event number to load |
Implemented in ROOTDataset, ReweightingDataset, SidebandDataset, SPlotDataset, MultiDataset, SubDataset, CombinedDataset, RegressionDataSet, and SingleDataset.
GeneralOptions m_general_options |
GeneralOptions passed to this dataset.
std::vector<float> m_input |
bool m_isSignal |
std::vector<float> m_spectators |
float m_target |
float m_weight |