Wraps the data of a multiple event into a Dataset.
More...
#include <Dataset.h>
|
| MultiDataset (const GeneralOptions &general_options, const std::vector< std::vector< float >> &input, const std::vector< std::vector< float >> &spectators, const std::vector< float > &targets={}, const std::vector< float > &weights={}) |
| Constructs a new MultiDataset. More...
|
|
virtual unsigned int | getNumberOfFeatures () const override |
| Returns the number of features in this dataset.
|
|
virtual unsigned int | getNumberOfSpectators () const override |
| Returns the number of spectators in this dataset.
|
|
virtual unsigned int | getNumberOfEvents () const override |
| Returns the number of events in this dataset.
|
|
virtual void | loadEvent (unsigned int iEvent) override |
| Does nothing in the case of a single dataset, because the only event is already loaded.
|
|
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. More...
|
|
virtual unsigned int | getSpectatorIndex (const std::string &spectator) |
| Return index of spectator with the given name. More...
|
|
virtual std::vector< float > | getFeature (unsigned int iFeature) |
| Returns all values of one feature in a std::vector<float> More...
|
|
virtual std::vector< float > | getSpectator (unsigned int iSpectator) |
| Returns all values of one spectator in a std::vector<float> More...
|
|
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.
|
|
|
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.
|
|
|
std::vector< std::vector< float > > | m_matrix |
| Feature matrix.
|
|
std::vector< std::vector< float > > | m_spectator_matrix |
| Spectator matrix.
|
|
std::vector< float > | m_targets |
| target vector
|
|
std::vector< float > | m_weights |
| weight vector
|
|
Wraps the data of a multiple event into a Dataset.
Mostly useful if one wants to apply an Expert to a feature matrix
Definition at line 186 of file Dataset.h.
◆ MultiDataset()
MultiDataset |
( |
const GeneralOptions & |
general_options, |
|
|
const std::vector< std::vector< float >> & |
input, |
|
|
const std::vector< std::vector< float >> & |
spectators, |
|
|
const std::vector< float > & |
targets = {} , |
|
|
const std::vector< float > & |
weights = {} |
|
) |
| |
Constructs a new MultiDataset.
- Parameters
-
general_options | which defines e.g. number of variables |
input | feature values of the single event |
spectators | spectator values of the single event |
targets | target values of the single event (defaults to 1, because often this is not known if one wants to apply an expert) |
weights | weights assigned to the input feature values |
Definition at line 145 of file Dataset.cc.
◆ getFeature()
std::vector< float > getFeature |
( |
unsigned int |
iFeature | ) |
|
|
virtualinherited |
◆ getFeatureIndex()
unsigned int getFeatureIndex |
( |
const std::string & |
feature | ) |
|
|
virtualinherited |
Return index of feature with the given name.
- Parameters
-
feature | name of the feature |
Definition at line 50 of file Dataset.cc.
◆ getSpectator()
std::vector< float > getSpectator |
( |
unsigned int |
iSpectator | ) |
|
|
virtualinherited |
◆ getSpectatorIndex()
unsigned int getSpectatorIndex |
( |
const std::string & |
spectator | ) |
|
|
virtualinherited |
Return index of spectator with the given name.
- Parameters
-
spectator | name of the spectator |
Definition at line 62 of file Dataset.cc.
The documentation for this class was generated from the following files: