This is Doxygen-generated documentation of the C++ Feature Selection Toolbox 4 library. The library implements several cutting edge feature selection methods as well as feature selection criteria + supporting data modeling tools and classifiers
The library makes extensive use of templates. It is header-only and depends only on the C++17 standard library (unlike FST3, no Boost is needed). The toolbox functionality is also available without C++ coding through the fst4 command-line tool — see the fst4 CLI flag reference (shipped in the distribution as doc/FST4_CLI.md). The compiled demo programs, shown with their sources cross-referenced to the classes they use, are collected under Examples.
This is the documentation of library version 4.2.0.
--format csv (inferred from a .csv/.tsv name): the delimiter (comma, semicolon or tab) and a header row are detected automatically, decimal commas are accepted whenever the delimiter is not the comma, and the class label is taken from the last column unless --csv-class names another column (by 0-based index or header name). Rows with missing values are skipped unless --csv-missing-to maps the missing cells to a numeric code. See the fst4 CLI reference for the flags and the class FST::Data_File_CSV for the parsing rules.
##datafile
##title Medical data
; 2-class 33-dimensional data representing tissue samples
; 128 samples of benign tissue, 222 samples of malignant tissue
##features 33
##classes 2 128,222
##data
13.54 14.36 87.46 566.3 0.09779 0.08129
0.06664 0.04781 0.1885 0.05766 0.2699 0.7886
2.058 23.56 0.008462 0.0146 0.02387 0.01315
.
.
##datafile keyword. The ##title line is optional. The ##features and ##classes lines are mandatory. The ##features keyword must be followed by a value depicting the number of features, separated by whitespace. The ##classes keyword must be followed by a value depicting the number of classes, then by whitespace, and then by a series of class sizes separated by commas. The ";" character at the beginning of a line depicts comment. Comments may appear anywhere inside header, but not after the header. No keywords, comments or special characters may occur after the ##data keyword, which depicts the start of the actual data. cmake -S . -B build-mac -DCMAKE_BUILD_TYPE=Release then cmake --build build-mac --parallel (use build-win / build-linux as the build-tree name on Windows / Linux, by convention); executables are placed in build-mac/bin (etc). For Visual C++ manual project setup and further details see README.md in the distribution root. Basic numeric types: (these are template parameters – the library never fixes them; the concrete type given with each name is the one the fst4 tool and the demos instantiate it with, a sound default for new applications)
data sample values - usually real numbers, but may be integers in text processing etc.; concrete type: double
Class types:
If FST4 contributes to your research, please cite the toolbox paper: Petr Somol and Pavel Pudil, Feature Selection Toolbox, Pattern Recognition 35(12):2749-2759, 2002.
The budgeted stochastic (sampled) sequential search (Sequential_Step_Sampled) is described in: Petr Somol and Jiri Grim, Stochastic Sequential Search in Very-High-Dimensional Feature Selection, arXiv:2608.01502, 2026.
Dept. of Pattern Recognition
UTIA, Institute of Information Theory and Automation
Pod vodarenskou vezi 4
18208 Praha 8
Czech Republic
(see Contacts at https://fst.utia.cz)
FST4 builds on the human-written FST3 codebase. Version 4 was developed by Petr Somol with Anthropic Claude models as coding assistants: Claude Fable 5 for most of the 2026 development (with minor contributions by Claude Opus 5), Claude Fable 5.1 for the full-codebase reviews before publication, and Claude Opus 4.5 for the December 2025 audit of the FST3 codebase. Design, decisions, review and the acceptance of every change are human work.
Copyright © 2000–present Institute of Information Theory and Automation of the Czech Academy of Sciences (UTIA), Prague.
FST4 is dual-licensed: it is free software under the GNU Affero General Public License, version 3 (the full text ships as LICENSE), and closed-source use without the AGPL's copyleft obligations requires a commercial license from UTIA. LICENSING.md in the distribution root explains both options and the contributor license agreement that every contribution requires. In case of interest in a commercial license, or with any licensing question, write to utia@.nosp@m.utia.nosp@m..cas..nosp@m.cz; technical questions and pull requests go to somol.nosp@m.@uti.nosp@m.a.cas.nosp@m..cz (please put "FST" in the subject line).