|
DiSMEC++
|
#include <metrics.h>
Public Member Functions | |
| ConfusionMatrixRecorder (long num_labels, long k) | |
| void | update (const pd_info_vec &prediction, const gt_info_vec &labels) override |
| void | reduce (const MetricCollectionInterface &other) override |
| std::unique_ptr< MetricCollectionInterface > | clone () const override |
| long | get_k () const |
| ConfusionMatrix | get_confusion_matrix (label_id_t label) 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... | |
Private Attributes | |
| long | m_K |
| long | m_InstanceCount = 0 |
| std::vector< ConfusionMatrix > | m_Confusion |
Additional Inherited Members | |
Public Types inherited from dismec::prediction::MetricCollectionInterface | |
| using | gt_info_vec = std::vector< sTrueLabelInfo > |
| using | pd_info_vec = std::vector< sPredLabelInfo > |
| ConfusionMatrixRecorder::ConfusionMatrixRecorder | ( | long | num_labels, |
| long | k | ||
| ) |
Definition at line 25 of file metrics.cpp.
References m_Confusion, and dismec::prediction::MetricCollectionInterface::num_labels().
|
overridevirtual |
Implements dismec::prediction::MetricCollectionInterface.
Definition at line 65 of file metrics.cpp.
References m_K, and dismec::prediction::MetricCollectionInterface::num_labels().
| ConfusionMatrix ConfusionMatrixRecorder::get_confusion_matrix | ( | label_id_t | label | ) | const |
Definition at line 58 of file metrics.cpp.
References m_Confusion, m_InstanceCount, dismec::ssize(), and dismec::opaque_int_type< Tag, T >::to_index().
Referenced by dismec::prediction::MacroMetricReporter::get_values().
|
inline |
Definition at line 54 of file metrics.h.
References m_K.
Referenced by dismec::prediction::MacroMetricReporter::add_confusion_matrix(), dismec::prediction::MacroMetricReporter::add_coverage(), and dismec::prediction::MacroMetricReporter::add_reduction_helper().
|
overridevirtual |
Implements dismec::prediction::MetricCollectionInterface.
Definition at line 46 of file metrics.cpp.
References ALWAYS_ASSERT_EQUAL, m_Confusion, m_InstanceCount, m_K, dismec::prediction::MetricCollectionInterface::num_labels(), and dismec::ssize().
|
overridevirtual |
Implements dismec::prediction::MetricCollectionInterface.
Definition at line 29 of file metrics.cpp.
References m_Confusion, m_InstanceCount, and m_K.
|
private |
Definition at line 59 of file metrics.h.
Referenced by ConfusionMatrixRecorder(), get_confusion_matrix(), reduce(), and update().
|
private |
Definition at line 58 of file metrics.h.
Referenced by get_confusion_matrix(), reduce(), and update().
|
private |