DiSMEC++
dismec::PropensityWeighting Class Reference

#include <weighting.h>

Inheritance diagram for dismec::PropensityWeighting:
dismec::WeightingScheme

Public Member Functions

 PropensityWeighting (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 56 of file weighting.h.

Constructor & Destructor Documentation

◆ PropensityWeighting()

PropensityWeighting::PropensityWeighting ( PropensityModel  model)
explicit

Definition at line 44 of file weighting.cpp.

Member Function Documentation

◆ get_negative_weight()

double PropensityWeighting::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 52 of file weighting.cpp.

◆ get_positive_weight()

double PropensityWeighting::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 48 of file weighting.cpp.

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

Member Data Documentation

◆ m_Propensity

PropensityModel dismec::PropensityWeighting::m_Propensity
private

Definition at line 62 of file weighting.h.

Referenced by get_positive_weight().


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