configuration of the wrapper metric; immutable during search, copied by criterion clones (thread-safe, RNG-free) More...
#include <wrapper_metrics.hpp>
Public Attributes | |
| Wrapper_Metric | metric = Wrapper_Metric::accuracy |
| which metric to compute; accuracy = the default path served by Classifier::test() | |
| std::vector< RETURNTYPE > | class_weights |
| unsigned int | f1_positive = 1 |
| class index the f1 metric scores as positive (two-class data; --f1-positive). Affects f1 ONLY - f1-macro averages over all classes, and auc keeps class 1 positive by its own convention | |
configuration of the wrapper metric; immutable during search, copied by criterion clones (thread-safe, RNG-free)
| std::vector<RETURNTYPE> FST::Metric_Spec< RETURNTYPE >::class_weights |
per-class cost weights, indexed by TRUE class; empty = unweighted. A weight scales the whole confusion-matrix ROW of its class, i.e. it is the relative importance of the samples of that class, not of the predictions made for it. Only the ratios matter - every classification metric here is a ratio of weighted counts, so scaling all weights by a common factor leaves the value unchanged. Example: weights (1,5) on two-class data make each class-1 sample count like five class-0 samples, so errors on class 1 become five times as expensive. Must hold at least classes entries when non-empty.