|
DiSMEC++
|
#include <metrics.h>
Public Member Functions | |
| InstanceAveragedMetric (long num_labels) | |
| void | reduce (const MetricCollectionInterface &other) override |
| double | value () const |
Public Member Functions inherited from dismec::prediction::MetricCollectionInterface | |
| MetricCollectionInterface (long num_labels) | |
| virtual | ~MetricCollectionInterface ()=default |
| long | num_labels () const |
| Gets the number of labels. More... | |
| virtual void | update (const pd_info_vec &prediction, const gt_info_vec &labels)=0 |
| virtual std::unique_ptr< MetricCollectionInterface > | clone () const =0 |
Protected Member Functions | |
| void | accumulate (double value) |
Private Attributes | |
| KahanAccumulator< double > | m_Accumulator = {} |
| long | m_NumSamples = 0 |
Additional Inherited Members | |
Public Types inherited from dismec::prediction::MetricCollectionInterface | |
| using | gt_info_vec = std::vector< sTrueLabelInfo > |
| using | pd_info_vec = std::vector< sPredLabelInfo > |
|
explicit |
Definition at line 70 of file metrics.cpp.
|
protected |
Definition at line 74 of file metrics.cpp.
References m_Accumulator, m_NumSamples, and value().
Referenced by dismec::prediction::InstanceRankedPositives::update(), and dismec::prediction::AbandonmentAtK::update().
|
overridevirtual |
Implements dismec::prediction::MetricCollectionInterface.
Definition at line 79 of file metrics.cpp.
References m_Accumulator, m_NumSamples, and dismec::KahanAccumulator< Float >::value().
|
inline |
Definition at line 67 of file metrics.h.
References m_Accumulator, m_NumSamples, and dismec::KahanAccumulator< Float >::value().
Referenced by accumulate(), and dismec::prediction::InstanceWiseMetricReporter::get_values().
|
private |
Definition at line 74 of file metrics.h.
Referenced by accumulate(), reduce(), and value().
|
private |
Definition at line 75 of file metrics.h.
Referenced by accumulate(), reduce(), and value().