Omnigraph
Graph engine for context assembly. Object-storage native. Agents work with graph data the way engineers work with code: branched, typed, reviewed, merged, audited, and governed.
FST4: a standalone C++17 library and command-line tool for feature selection and, more generally, for finding near-optimal or provably optimal subsets under any subset-quality criterion — reduce dimen
DataC++ · ShellGitHub @psomolOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Feature Selection Toolbox 4 — C++17 header-only library and CLI that finds near-optimal or provably optimal subsets of a large set under any subset-quality criterion: built-in feature selection filters and wrappers, or your own set function, even an external program. Branch & Bound, floating and stochastic search; deterministic at any thread count
Taken from the repository README
Loading the full README.
Read the full README ↗The arXiv badge links the paper on the budgeted stochastic sequential search, a new principal component of this version, not a description of the toolbox as a whole; see Citing FST4.
Feature Selection Toolbox 4 (FST4) is a standalone C++17 library and command-line tool for feature selection (also known as attribute or variable selection): it reduces problem dimensionality to maximize the accuracy of data models and automatic decision rules and to reduce data acquisition cost. This is FST4 version 4.2, the first published FST4 release; the last public release before it was FST3 (see Version history).
More generally, FST4 is a subset optimizer. Every search in it maximizes a
user-supplied set function over a finite universe of candidates, so the same
algorithms that pick features can pick sensors, experiments, portfolio
components or any other subset for which a candidate can be scored. The scorer
can be a built-in criterion, a C++ class of your own, or any external program
(--criterion extern-value, with or without a data file). The sequential,
floating and stochastic heuristics return near-optimal subsets at thousands of
candidates; Branch & Bound returns the provably optimal subset when the
criterion is monotone (it never decreases when a candidate is added).
fst4 command-line tool exposes the whole library
through flags and config files, with text, JSON and CSV output, and ships
with 51 ready-to-run demo configurations. The library is header-only with
no external dependencies (LibSVM and Eigen are optional extensions).cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel --target fst4
build/bin/fst4 --data data/wdbc_30.trn --criterion gmahalanobis --search sfs --target-d 7 --validate knn
build/bin/fst4 --config demos/demo10.cfg
Run fst4 from the repository root so that the relative data/ paths
resolve. build/bin/fst4 --help lists every flag, --list prints the
component registry with validity notes.
doxygen doxygen.cfg run from doc/ (output doc/html).If FST4 contributes to your research, please cite the toolbox paper:
The budgeted stochastic (sampled) sequential search (--evaluator sampled,
demos demo36.cfg and demo37t.cfg) is a new principal component of FST4 and
one of the main contributions of this release: it bounds the evaluation cost
of every sequential step by a candidate budget independent of the
dimensionality, which is what makes floating search feasible at thousands of
features. The following paper describes this component, not the toolbox as a
whole:
CITATION.cff carries the same references in machine-readable form ("Cite this repository" in the sidebar).
FST4 is dual-licensed. You may use it under either of the following:
FST4 software (with the exception of the bundled third-party components and the sample data sets listed below) is Copyright © 2000–present Institute of Information Theory and Automation of the Czech Academy of Sciences (ÚTIA). LICENSING.md explains the two options and the Contributor License Agreement that every contribution requires. FST4 comes without warranty of any kind, as stated in sections 15 and 16 of the LICENSE. Licensing questions go to [email protected]; technical questions, bug reports and pull requests go to [email protected], with "FST" somewhere in the subject line (see CONTRIBUTING.md).
cli11/LICENSE in source form, and reproduce the
notice (this section or cli11/LICENSE) in materials accompanying any
binary containing the fst4 tool.wrapper-linsvm and wrapper-rbfsvm criteria cover both SVM kernels of
practical value with no external library) and is NOT distributed with FST4
(licensing policy). It is needed only for the LibSVM-backed SVM tools
(classifier_svm.hpp): if you want those, fetch svm.cpp and svm.h
(version 3.37, drop-in compatible) into libsvm/ following the instructions
in libsvm/readme.txt, including the info()
log-silencing tweak (the SVM test scenarios assume it). LibSVM is Copyright
(c) 2000-2023 Chih-Chung Chang and Chih-Jen Lin, BSD-3-Clause license.-DFST4_USE_EIGEN=ON -DFST4_EIGEN_DIR=<eigen-root> swaps the internal
matrix numerics (LU/inverse/determinant) to a user-supplied Eigen for
cross-validation of results (see Building and
RELEASE_NOTES.md). Such builds define
EIGEN_MPL2_ONLY, so only Eigen's Mozilla Public License 2.0 core is used
(the build fails if anything outside it were pulled in); MPL2 obligations
attach to Eigen's own files, not to FST4 code. Default builds contain no
Eigen code at all.demos/*.cfg parity configs and the golden test
scenarios. They are third-party research data and are NOT covered by the
FST4 copyright above: each carries its own terms. Full per-data-set
attribution (creators, DOI, licence, and the modifications FST4 applied) is
in data/NOTICE, and each data file repeats its own origin
and terms in its header (except the .csv files, whose format has no room
for one; NOTICE covers them)..trn file is a format conversion, mushroom_125.trn is
binarized from the original 22 categorical attributes,
sonar_60_missing_data.trn is an FST-made variant with 30% of the values
marked missing, and the .csv files are CSV-format conversions of the
corresponding .trn files (same values, same sample order), included so the
demos can exercise the CSV reader. data/NOTICE records this per file.reuters_apte.arff: Reuters-21578, Distribution 1.0. Copyright for the
underlying newswire text and Reuters annotations resides with Reuters Ltd.;
Reuters Ltd. and Carnegie Group, Inc. have agreed to allow free distribution
of the collection for research purposes only. The FST4 file contains no
article text: it is an anonymized sparse term-frequency matrix (attributes
a1..a10105, classes cls0..cls32) from which no document can be
reconstructed.data/NOTICE and the data file headers intact (the CSV format has no
comment syntax, so the .csv files carry no in-file header;
data/NOTICE is their attribution record).FST4 requires a C++17 conforming compiler and has no external library
dependencies. Unlike FST3 it needs no Boost: the C++ standard library
replaces it. LibSVM and Eigen are both OPTIONAL and not distributed with
FST4: LibSVM only for the LibSVM-backed SVM tools (fetch it into libsvm/
per libsvm/readme.txt), Eigen only for the verification
build (-DFST4_USE_EIGEN, below); a default build needs neither. CLI11 is
bundled (cli11/) and is used by the fst4 tool only. FST4 was
developed and tested with MinGW-W64 g++ 15.2 on Windows (x86-64), Apple
clang on macOS (arm64) and GCC 13 on Linux (arm64); any C++17 conforming
compiler is expected to work.
CMake (any platform):
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel
Executables are placed in build/bin (fst4, the exemplar demos, smoke
tests). Useful targets: fst4, demos, smoke_tests, demos_all.
Options: -DFST4_WITH_SVM=OFF skips the LibSVM-dependent targets and builds
an SVM-less fst4; -DFST4_USE_EIGEN=ON -DFST4_EIGEN_DIR=<eigen-root> swaps
the internal matrix numerics to Eigen (intended for verification builds, see
RELEASE_NOTES.md). A -DCMAKE_BUILD_TYPE=Debug tree
enables the assertions and -Wall.
Windows / Visual C++ without CMake: create an Empty Project and manually
Add Existing header files (hpp) and source files (cpp). Add only one demo cpp
at a time (or fst4.cpp). Set the C++ Language Standard to C++17 or newer.
No external include or library paths are needed. Compiling
_src_global/global.cpp is no longer required (it remains as an empty
compatibility stub so that older project files keep working). For threaded
demos add FST_THREADED to Preprocessor Definitions under Configuration
Properties - C/C++ - Preprocessor; for a debug target add DEBUG, for a
release target NDEBUG. For SVM-based code add libsvm/svm.cpp (fetched per
libsvm/readme.txt) to the project and libsvm to
Additional Include Directories. Visual C++ produces "unsafe/deprecated"
warnings related solely to the TRN and ARFF file-format readers because of
their old C-style input/output calls (fscanf, strtok etc.); defining
_CRT_SECURE_NO_WARNINGS switches them off without any negative consequence.
Some normal-model sources use M_PI, which Visual C++ may not define by
default; if so, add _USE_MATH_DEFINES to Preprocessor Definitions.
Library use: the library is header-only. Include the headers you need (see the exemplar sources in demos/); nothing else needs to be compiled.
Build verification: the golden-output test harness in tests/ recomputes a set of reference scenarios and compares the outputs byte-exactly against the recorded reference outputs:
FST_BIN=build/bin sh tests/golden.sh check
The reference baselines are per-platform and auto-selected: baselines for
Windows x86-64 (tests/golden-win-x64/), macOS arm64
(tests/golden-macos-arm64/) and Linux arm64 (tests/golden-linux-arm64/)
are included; on any other platform set FST_GOLDEN_DIR to a baseline
directory of your own capture. See tests/README.md.
The library as a whole is not thread safe. Only those portions of the library
that are used inside threaded feature selection routines are thread safe:
mostly the classes derived from Clonable, in particular Criterion and
Data_Accessor derived and related code.
In rare occurrences the Divergence criterion on some data breaches monotonicity (adding a feature to a subset causes Divergence to decrease). This is undesirable in connection with Branch & Bound, which assumes monotonicity and may then miss the optimum. The reason is numerical instability: Divergence needs two matrix inversions per evaluation, and on ill-conditioned data the computed values lose accuracy. This is a property of the measure, not a defect that a code fix can remove, so the caution stands in 4.2. What did change: a normal-model criterion that arrives at a non-finite value (NaN or infinity) now aborts with a descriptive error instead of letting a search silently accept the garbage, and Bhattacharyya distance forms its covariance term in the log domain, so it no longer over- or underflows on badly scaled data (see RELEASE_NOTES.md). The recommendation therefore remains to prefer Bhattacharyya distance (one inversion, verified against an unrelated library and, in 4.0, against the Eigen library) whenever an optimal search is used.
Remark: numerical problems are expectable with probabilistic criteria in general when the number of training samples in data is insufficient with respect to dimensionality. This is a theoretical problem - the only reasonable workaround is obtaining more training samples.
LibSVM-backed SVM training/testing (wrapper-svm) freezes on some data. LINEAR and SIGMOID kernels seem to be particularly affected, RBF kernel is least affected. Evaluating individual features seems to be more prone to freeze than evaluating feature groups. Note that this problem could not be located in FST codes and is almost certainly the problem in LibSVM. Since 4.2 the native, dependency-free wrapper-linsvm and wrapper-rbfsvm criteria cover linear and RBF-kernel SVM selection without LibSVM and without this freeze; wrapper-svm remains for the FST3 parity configs, --svm-optimize and the poly/sigmoid kernels.
Historical issue, believed resolved: textual output of time consuming multi-threaded searches could occasionally stall after a long period of time while the search itself continued correctly. Two root causes were found and fixed: thread-unsafe use of the shared output stream and iteration state (fixed in a December 2025 audit) and a lost-wakeup race in the threaded candidate evaluator (fixed in 4.0; see RELEASE_NOTES.md). Should output stalling nevertheless recur, the workaround remains to switch textual output off using set_output_detail(FST::SILENT); the output stream is then not used in the course of search, only at the end to report final results.
Bug reports and feature requests are welcome as issues. Pull requests are welcome too; CONTRIBUTING.md describes what they must bring along (the Contributor License Agreement, the golden gate, the coding rules). Security problems go through SECURITY.md, not through public issues.
FST4 4.2 is the first published FST4 version; 4.0 and 4.1 were internal development milestones that never shipped separately, so a user of FST3 receives all three steps at once. RELEASE_NOTES.md keeps one detailed section per version.
4.2.0 (the first public FST4 release)
4.1.0 (internal milestone)
4.0.0 (internal milestone)
3.1.0.beta
3.0.2.beta
3.0.1.beta
3.0.0.beta