Belle II Software development
|
Core class for the training of regression methods based on binary classifiers. More...
#include <Regression.h>
Public Member Functions | |
RegressionTeacher (const GeneralOptions &general_options, const RegressionClassifierOptions &specific_options) | |
Create a new teacher out of the general and the regression method specific options. | |
Weightfile | train (Dataset &training_data) const override |
Call the train function. | |
Protected Attributes | |
GeneralOptions | m_general_options |
GeneralOptions containing all shared options. | |
Private Attributes | |
RegressionClassifierOptions | m_specific_options |
The method specific options. | |
BaseClassifierTeacher | m_baseClassifierTeacher |
The teacher to use for training. | |
Core class for the training of regression methods based on binary classifiers.
The idea is as follows:
Each binary classifier is trained on the same data, but as a (binary) target is using
s >= (1/number of bins) * (bin number)
for every bin in [1, number of bins). This means, the first method is able to decide if a target value is very low or not, the second if it is medium low or not ... and the last if it is very high or not. The expert answer to a new data sample is the averaged output of all classifiers, which is very high, if all classifiers think it has a high value (then the target value is probably high) and very small, if non of them thinks the target value is high.
The class is very generic and can be used with every binary classifier.
BaseClassifierTeacher | The teacher of the base binary classifier |
RegressionClassifierOptions | The options of the classifier (probably inheriting from RegressionOptions) |
Definition at line 139 of file Regression.h.
RegressionTeacher | ( | const GeneralOptions & | general_options, |
const RegressionClassifierOptions & | specific_options | ||
) |
Create a new teacher out of the general and the regression method specific options.
Definition at line 265 of file Regression.h.
|
overridevirtual |
Call the train function.
For each bin number in [1, number of bins) train a new classifier on the target
s >= (1/number of bins) * (bin number)
where s is the target variable of the dataset. By this, we end up with (number of bins) classifier, each trained on the same data but with different targets.
Implements Teacher.
Definition at line 245 of file Regression.h.
|
private |
The teacher to use for training.
Definition at line 161 of file Regression.h.
|
protectedinherited |
GeneralOptions containing all shared options.
|
private |
The method specific options.
Definition at line 159 of file Regression.h.