Precision is a metric of performance for classification algorithms that for binary classification is equal to , where and are the numbers of true positives and false positives respectively. More...
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 precision. More... | |
Static Public Attributes | |
static const bool | NeedsMinimization = false |
Information for hyper-parameter tuning code. More... | |
Precision is a metric of performance for classification algorithms that for binary classification is equal to , where and are the numbers of true positives and false positives respectively.
For multiclass classification the precision metric can be used with the following strategies for averaging.
where and are the numbers of true positives and false positives respectively for the class (label) .
where and are the numbers of true positives and false positives respectively for the class (label) .
AS | An average strategy. |
PositiveClass | In the case of binary classification (AS = Binary) positives are assumed to have labels equal to this value. |
Definition at line 48 of file precision.hpp.
|
static |
Run classification and calculate precision.
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.
Definition at line 67 of file precision.hpp.