Belle II Software
release-08-01-10
|
Dataset needed during the training of a regression method. More...
#include <Regression.h>
Public Member Functions | |
RegressionDataSet (const GeneralOptions &general_options, Dataset *dataSet, double cutValue) | |
Create a new regression data set out of the general options, a pointer to the real dataset and the cut value. | |
unsigned int | getNumberOfFeatures () const override |
Return the number of features from the real dataset. | |
unsigned int | getNumberOfEvents () const override |
Return the number of events from the real dataset. | |
unsigned int | getNumberOfSpectators () const override |
Return the number of spectators from the real dataset. | |
void | loadEvent (unsigned int iEvent) override |
Load an event. Sets all internal variables and sets the isSignal variable dependent on the cut value. | |
std::vector< float > | getFeature (unsigned int iFeature) override |
Return a specific feature from the real dataset. | |
std::vector< float > | getSpectator (unsigned int iSpectator) override |
Return a specific spectator from the real dataset. | |
std::vector< float > | getWeights () override |
Return the weights from the real dataset. | |
std::vector< float > | getTargets () override |
Return the targets from the real dataset. | |
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< 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. | |
Private Attributes | |
double | m_cutValue |
The cut value. | |
Dataset * | m_childDataSet |
The real data set (our child) | |
Dataset needed during the training of a regression method.
It basically wraps another dataset it receives as pointer and every call to this dataset is forwarded to the other dataset.
The only difference is, that the isSignal variable is set dependent on the cut value given in the constructor to
isSignal = target >= cutValue
to generate a binary classification out of a regression task.
Definition at line 77 of file Regression.h.
|
virtualinherited |
Return index of feature with the given name.
feature | name of the feature |
Definition at line 50 of file Dataset.cc.
|
virtualinherited |
Return index of spectator with the given name.
spectator | name of the spectator |
Definition at line 62 of file Dataset.cc.