DiSMEC++
|
Base class for label-based weighting schemes. More...
#include <weighting.h>
Public Member Functions | |
virtual | ~WeightingScheme ()=default |
virtual double | get_positive_weight (label_id_t label_id) const =0 |
Gets the weight to use for all examples where the label label_id is present. More... | |
virtual double | get_negative_weight (label_id_t label_id) const =0 |
Gets the weight to use for all examples where the label label_id is absent. More... | |
Base class for label-based weighting schemes.
A label-based weighting scheme assigns each training example a weight depending on whether the labels is present or absent. These weights can depend on the label id, and are requested using the get_positive_weight()
and get_negative_weight()
functions respectively.
Definition at line 32 of file weighting.h.
|
virtualdefault |
|
pure virtual |
Gets the weight to use for all examples where the label label_id
is absent.
Implemented in dismec::CustomWeighting, dismec::PropensityDownWeighting, dismec::PropensityWeighting, and dismec::ConstantWeighting.
Referenced by anonymous_namespace{py_train.cpp}::get_negative_weight().
|
pure virtual |
Gets the weight to use for all examples where the label label_id
is present.
Implemented in dismec::CustomWeighting, dismec::PropensityDownWeighting, dismec::PropensityWeighting, and dismec::ConstantWeighting.
Referenced by anonymous_namespace{py_train.cpp}::get_positive_weight().