12 #ifndef MLPACK_CORE_CV_METRICS_F1_HPP 13 #define MLPACK_CORE_CV_METRICS_F1_HPP 15 #include <type_traits> 44 template<AverageStrategy AS,
size_t PositiveClass = 1>
55 template<
typename MLAlgorithm,
typename DataType>
56 static double Evaluate(MLAlgorithm& model,
58 const arma::Row<size_t>& labels);
74 static double Evaluate(MLAlgorithm& model,
76 const arma::Row<size_t>& labels);
86 static double Evaluate(MLAlgorithm& model,
88 const arma::Row<size_t>& labels);
99 static double Evaluate(MLAlgorithm& model,
100 const DataType& data,
101 const arma::Row<size_t>& labels);
108 #include "f1_impl.hpp" typename enable_if< B, T >::type enable_if_t
Linear algebra utility functions, generally performed on matrices or vectors.
static const bool NeedsMinimization
Information for hyper-parameter tuning code.
static double Evaluate(MLAlgorithm &model, const DataType &data, const arma::Row< size_t > &labels)
Run classification and calculate F1.
Include all of the base components required to write mlpack methods, and the main mlpack Doxygen docu...
AverageStrategy
This enum declares possible strategies for averaging that can be used in some metrics like precision...
F1 is a metric of performance for classification algorithms that for binary classification is equal t...