DiSMEC++
dismec::PropensityDownWeighting Class Reference

#include <weighting.h>

Inheritance diagram for dismec::PropensityDownWeighting:
dismec::WeightingScheme

Public Member Functions

 PropensityDownWeighting (PropensityModel model)
 
double get_positive_weight (label_id_t label_id) const override
 Gets the weight to use for all examples where the label label_id is present. More...
 
double get_negative_weight (label_id_t label_id) const override
 Gets the weight to use for all examples where the label label_id is absent. More...
 
- Public Member Functions inherited from dismec::WeightingScheme
virtual ~WeightingScheme ()=default
 

Private Attributes

PropensityModel m_Propensity
 

Detailed Description

Definition at line 65 of file weighting.h.

Constructor & Destructor Documentation

◆ PropensityDownWeighting()

PropensityDownWeighting::PropensityDownWeighting ( PropensityModel  model)
explicit

Definition at line 56 of file weighting.cpp.

Member Function Documentation

◆ get_negative_weight()

double PropensityDownWeighting::get_negative_weight ( label_id_t  label_id) const
overridevirtual

Gets the weight to use for all examples where the label label_id is absent.

Implements dismec::WeightingScheme.

Definition at line 64 of file weighting.cpp.

References dismec::PropensityModel::get_propensity(), and m_Propensity.

◆ get_positive_weight()

double PropensityDownWeighting::get_positive_weight ( label_id_t  label_id) const
overridevirtual

Gets the weight to use for all examples where the label label_id is present.

Implements dismec::WeightingScheme.

Definition at line 60 of file weighting.cpp.

Member Data Documentation

◆ m_Propensity

PropensityModel dismec::PropensityDownWeighting::m_Propensity
private

Definition at line 71 of file weighting.h.

Referenced by get_negative_weight().


The documentation for this class was generated from the following files: