![]() |
OpenMS
|
MRMFeatureSelector implementation that selects MRM features via a linear program with score-weighted per-feature variables. More...
#include <OpenMS/ANALYSIS/OPENSWATH/MRMFeatureSelector.h>
Public Member Functions | |
| void | optimize (const std::vector< std::pair< double, std::string > > &time_to_name, const std::map< std::string, std::vector< Feature > > &feature_name_map, std::vector< std::string > &result, const SelectorParameters ¶meters) const override |
Build the linear program for time_to_name and write the names of selected features to result. | |
Public Member Functions inherited from MRMFeatureSelector | |
| MRMFeatureSelector ()=default | |
| virtual | ~MRMFeatureSelector ()=default |
| void | selectMRMFeature (const FeatureMap &features, FeatureMap &selected_filtered, const SelectorParameters ¶meters) const |
Additional Inherited Members | |
Public Types inherited from MRMFeatureSelector | |
| enum class | VariableType { INTEGER = 1 , CONTINUOUS } |
| enum class | LambdaScore { LINEAR = 1 , INVERSE , LOG , INVERSE_LOG , INVERSE_LOG10 } |
Protected Member Functions inherited from MRMFeatureSelector | |
| Int | addVariable_ (LPWrapper &problem, const std::string &name, const bool bounded, const double obj, const VariableType variableType) const |
| double | computeScore_ (const Feature &feature, const std::map< std::string, LambdaScore > &score_weights) const |
| void | addConstraint_ (LPWrapper &problem, const std::vector< Int > &indices, const std::vector< double > &values, const std::string &name, const double lb, const double ub, const LPWrapper::Type param) const |
MRMFeatureSelector implementation that selects MRM features via a linear program with score-weighted per-feature variables.
Simpler than MRMFeatureSelectorQMIP — no nearest-neighbour coupling, no pairwise quadratic terms. Each transition contributes one binary (or continuous) variable per candidate feature plus an equality constraint forcing exactly one feature to be picked per transition (sum == 1). The objective is the sum of per-feature scores produced by computeScore_ from MRMFeatureSelector::SelectorParameters::score_weights.
|
overridevirtual |
Build the linear program for time_to_name and write the names of selected features to result.
Uses LPWrapper with LPWrapper::MIN objective sense. For each transition, registers one variable per candidate feature (binary or continuous, per parameters.variable_type) scored by computeScore_, and adds a DOUBLE_BOUNDED constraint with both bounds equal to 1.0 (i.e. exactly one feature must be picked per transition). After solving, every column whose value is >= parameters.optimal_threshold contributes its name to result. result is cleared on entry.
| [in] | time_to_name | Pairs of (retention time, transition name). Order is irrelevant — unlike the QMIP variant, no neighbour window is used. |
| [in] | feature_name_map | Transition name → its candidate features. |
| [out] | result | Names of the selected features (one per column whose solver value clears optimal_threshold). Cleared on entry. |
| [in] | parameters | Algorithm parameters (variable_type, score_weights, optimal_threshold; nn_threshold and locality_weight are not consulted). |
Implements MRMFeatureSelector.