mlpack
|
Recall is a metric of performance for classification algorithms that for binary classification is equal to \( tp / (tp + fn) \), where \( tp \) and \( fn \) are the numbers of true positives and false negatives respectively. More...
#include <recall.hpp>
Static Public Member Functions | |
template<typename MLAlgorithm , typename DataType > | |
static double | Evaluate (MLAlgorithm &model, const DataType &data, const arma::Row< size_t > &labels) |
Run classification and calculate recall. More... | |
Static Public Attributes | |
static const bool | NeedsMinimization = false |
Information for hyper-parameter tuning code. More... | |
Recall is a metric of performance for classification algorithms that for binary classification is equal to \( tp / (tp + fn) \), where \( tp \) and \( fn \) are the numbers of true positives and false negatives respectively.
For multiclass classification the recall metric can be used with the following strategies for averaging.
\[ (tp_0 + tp_1 + \ldots + tp_N) / (tp_0 + tp_1 + \ldots + tp_N + fn_0 + fn_1 + \ldots + fn_N), \]
where \( tp_i \) and \( fn_i \) are the numbers of true positives and false negatives respectively for the class (label) \( i \).\[ tp_0 / (tp_0 + fn_0), tp_1 / (tp_1 + fn_1), \ldots, tp_N / (tp_N + fn_N), \]
where \( tp_i \) and \( fn_i \) are the numbers of true positives and false negatives respectively for the class (label) \( i \).AS | An average strategy. |
PositiveClass | In the case of binary classification (AS = Binary) positives are assumed to have labels equal to this value. |
|
static |
Run classification and calculate recall.
model | A classification model. |
data | Column-major data containing test items. |
labels | Ground truth (correct) labels for the test items. |
|
static |
Information for hyper-parameter tuning code.
It indicates that we want to maximize the metric.