Public Member Functions | |
precall (int N) | |
Constructs an object. | |
virtual | ~precall () |
Destructs an object. | |
void | resize (int N) |
Resize the number of labels. | |
void | set (int p, int r) |
Sets a pair of predicted and reference labels. | |
template<class positive_iterator_type> | |
void | output_micro (std::ostream &os, positive_iterator_type pb, positive_iterator_type pe) const |
Outputs micro-average precision, recall, F1 scores. | |
template<class positive_iterator_type> | |
void | output_macro (std::ostream &os, positive_iterator_type pb, positive_iterator_type pe) const |
Outputs macro-average precision, recall, F1 scores. | |
Protected Attributes | |
std::vector< label_stat > | m_stat |
The label-wise stats. | |
Data Structures | |
struct | label_stat |
A counter for each label. More... |
classias::precall::precall | ( | int | N | ) | [inline] |
Constructs an object.
N | The number of labels. |
void classias::precall::resize | ( | int | N | ) | [inline] |
Resize the number of labels.
N | The number of labels. |
void classias::precall::set | ( | int | p, | |
int | r | |||
) | [inline] |
Sets a pair of predicted and reference labels.
p | The predicted label. | |
r | The reference label. |
void classias::precall::output_micro | ( | std::ostream & | os, | |
positive_iterator_type | pb, | |||
positive_iterator_type | pe | |||
) | const [inline] |
Outputs micro-average precision, recall, F1 scores.
os | The output stream. | |
pb | The iterator for the first element of the positive labels. | |
pe | The iterator just beyond the last element of the positive labels. |
void classias::precall::output_macro | ( | std::ostream & | os, | |
positive_iterator_type | pb, | |||
positive_iterator_type | pe | |||
) | const [inline] |
Outputs macro-average precision, recall, F1 scores.
os | The output stream. | |
pb | The iterator for the first element of the positive labels. | |
pe | The iterator just beyond the last element of the positive labels. |