Feature Selection Toolbox FST4
UTIA · Czech Academy of Sciences
Loading...
Searching...
No Matches
wrapper_metrics.hpp File Reference

Wrapper criterion metrics beyond accuracy (balanced accuracy, F1, AUC, class weights, regression metrics). More...

#include <vector>
#include <string>
#include <utility>
#include <algorithm>
#include <cmath>

Go to the source code of this file.

Classes

struct  FST::Metric_Spec< RETURNTYPE >
 configuration of the wrapper metric; immutable during search, copied by criterion clones (thread-safe, RNG-free) More...

Namespaces

namespace  FST
 The Feature Selection Toolbox 4 library: every library component – data access, criteria and classifiers, search algorithms, result trackers and the global infrastructure – lives in this namespace.

Enumerations

enum class  FST::Wrapper_Metric {
  FST::accuracy , FST::balanced_accuracy , FST::f1 , FST::f1_macro ,
  FST::auc , FST::r2 , FST::neg_rmse , FST::neg_mae
}

Functions

const char * FST::wrapper_metric_name (const Wrapper_Metric m)
 Returns the canonical CLI name (--wrapper-metric value) for m, e.g. "balanced-accuracy"; the inverse of wrapper_metric_from_name().
bool FST::wrapper_metric_from_name (const std::string &name, Wrapper_Metric &m)
 Parses a CLI metric name (--wrapper-metric value, e.g. "f1-macro") into m.
template<typename RETURNTYPE, typename DIMTYPE>
bool FST::metric_from_confusion (RETURNTYPE &result, const Wrapper_Metric metric, const std::vector< RETURNTYPE > &confusion, const DIMTYPE classes, const std::vector< RETURNTYPE > &class_weights, const DIMTYPE f1_positive=1)
template<typename RETURNTYPE, typename DIMTYPE>
bool FST::auc_from_scores (RETURNTYPE &result, std::vector< std::pair< RETURNTYPE, DIMTYPE > > &scores)
template<typename RETURNTYPE, typename DIMTYPE>
bool FST::auc_macro_from_scores (RETURNTYPE &result, const std::vector< RETURNTYPE > &scores, const std::vector< DIMTYPE > &labels, const DIMTYPE classes)
template<typename RETURNTYPE>
bool FST::metric_from_predictions (RETURNTYPE &result, const Wrapper_Metric metric, const std::vector< std::pair< RETURNTYPE, RETURNTYPE > > &pairs)

Detailed Description

Wrapper criterion metrics beyond accuracy (balanced accuracy, F1, AUC, class weights, regression metrics).

======================================================================

Feature Selection Toolbox 4 source code

Author
Petr Somol (somol.nosp@m.@uti.nosp@m.a.cas.nosp@m..cz) with collaborators, see Contacts at https://fst.utia.cz
Version 4 was developed with Anthropic Claude models as coding assistants: Claude Fable 5 for the 2026 development (with minor contributions by Claude Opus 5), Claude Fable 5.1 for the pre-publication reviews of the full codebase, and Claude Opus 4.5 for the December 2025 audit of the FST3 codebase; design, decisions, review and acceptance are human work
Date
July 2026
Version
4.2.0
Note
FST4 was developed using MinGW-W64 g++ 15.2 and requires
  • a C++17 conforming compiler and standard library (no Boost, unlike FST3),
Note that LibSVM is required for SVM related tools only.
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.