F1 is a metric of performance for classification algorithms that for binary classification is equal to . 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 F1. More... | |
Static Public Attributes | |
static const bool | NeedsMinimization = false |
Information for hyper-parameter tuning code. More... | |
F1 is a metric of performance for classification algorithms that for binary classification is equal to .
For multiclass classification the F1 metric can be used with the following strategies for averaging.
In the case of multiclass classification it is assumed that there are instances of every label from 0 to max(labels) among input data points.
The returned value for F1 will be zero if both precision and recall turn out to be zeros.
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 F1.
model | A classification model. |
data | Column-major data containing test items. |
labels | Ground truth (correct) labels for the test items. |
|
static |