![]() |
Belle II Software release-09-00-03
|
Wraps the data of a single event into a Dataset. More...
#include <Dataset.h>


Public Member Functions | |
| SingleDataset (const GeneralOptions &general_options, const std::vector< float > &input, float target=1.0, const std::vector< float > &spectators=std::vector< float >()) | |
| Constructs a new SingleDataset. | |
| virtual unsigned int | getNumberOfFeatures () const override |
| Returns the number of features in this dataset. | |
| virtual unsigned int | getNumberOfSpectators () const override |
| Returns the number of features in this dataset. | |
| virtual unsigned int | getNumberOfEvents () const override |
| Returns the number of events in this dataset which is always one. | |
| virtual void | loadEvent (unsigned int) override |
| Does nothing in the case of a single dataset, because the only event is already loaded. | |
| virtual std::vector< float > | getFeature (unsigned int iFeature) override |
| Returns all values (in this case only one) of one feature in a std::vector<float> | |
| virtual std::vector< float > | getSpectator (unsigned int iSpectator) override |
| Returns all values (in this case only one) of one spectator in a std::vector<float> | |
| 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 > | 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. | |
Wraps the data of a single event into a Dataset.
Mostly useful if one wants to apply an Expert to a single feature vector
| SingleDataset | ( | const GeneralOptions & | general_options, |
| const std::vector< float > & | input, | ||
| float | target = 1.0, |
||
| const std::vector< float > & | spectators = std::vector<float>() |
||
| ) |
Constructs a new SingleDataset.
| general_options | which defines e.g. number of variables |
| input | feature values of the single event |
| spectators | spectator values of the single event |
| target | target value of the single event (defaults to 1, because often this is not known if one wants to apply an expert) |
Definition at line 135 of file Dataset.cc.
|
inlineoverridevirtual |
|
virtualinherited |
Return index of feature with the given name.
| feature | name of the feature |
Definition at line 50 of file Dataset.cc.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
virtualinherited |
Returns the signal fraction of the whole sample.
Reimplemented in SPlotDataset.
Definition at line 35 of file Dataset.cc.
|
virtualinherited |
Returns all is Signals.
Reimplemented in ReweightingDataset.
Definition at line 122 of file Dataset.cc.
|
inlineoverridevirtual |
|
virtualinherited |
Return index of spectator with the given name.
| spectator | name of the spectator |
Definition at line 62 of file Dataset.cc.
|
virtualinherited |
Returns all targets.
Reimplemented in RegressionDataSet, and ReweightingDataset.
Definition at line 110 of file Dataset.cc.
|
virtualinherited |
Returns all weights.
Reimplemented in ROOTDataset, RegressionDataSet, and ReweightingDataset.
Definition at line 98 of file Dataset.cc.
|
inlineoverridevirtual |
|
inherited |
GeneralOptions passed to this dataset.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |