Feature Selection Toolbox FST4
UTIA · Czech Academy of Sciences
Loading...
Searching...
No Matches
FST::Metric_Spec< RETURNTYPE > Struct Template Reference

configuration of the wrapper metric; immutable during search, copied by criterion clones (thread-safe, RNG-free) More...

#include <wrapper_metrics.hpp>

Public Member Functions

bool is_default () const
 true iff this spec is the plain unweighted accuracy path (f1_positive is irrelevant unless metric==f1, so it stays out of this test)
bool is_regression_metric () const
 true for the three regression metrics (r2/neg_rmse/neg_mae), false for the classification metrics

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

Detailed Description

template<typename RETURNTYPE>
struct FST::Metric_Spec< RETURNTYPE >

configuration of the wrapper metric; immutable during search, copied by criterion clones (thread-safe, RNG-free)

Member Data Documentation

◆ class_weights

template<typename RETURNTYPE>
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.


The documentation for this struct was generated from the following file:
Copyright © 2000–present ÚTIA, Institute of Information Theory and Automation of the Czech Academy of Sciences · Contacts · This site sets no cookies and uses no analytics.