OpenMS
Loading...
Searching...
No Matches
MRMFeatureSelectorQMIP Class Reference

MRMFeatureSelector implementation that selects MRM features via a quadratic-programming formulation over relative retention time. More...

#include <OpenMS/ANALYSIS/OPENSWATH/MRMFeatureSelector.h>

Inheritance diagram for MRMFeatureSelectorQMIP:
[legend]
Collaboration diagram for MRMFeatureSelectorQMIP:
[legend]

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 &parameters) const override
 Build the quadratic LP problem 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 &parameters) 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
 

Detailed Description

MRMFeatureSelector implementation that selects MRM features via a quadratic-programming formulation over relative retention time.

For each transition, considers neighbouring transitions inside MRMFeatureSelector::SelectorParameters::nn_threshold and adds locality-weighted pairwise terms keyed on the expected retention-time delta. Per-feature score is normalised by the nth root of the number of score_weights entries (with n the number of weights) so multi-weight configurations don't dominate the QP.

Companion to MRMFeatureSelectorScore (linear, no nearest-neighbour coupling).

Member Function Documentation

◆ optimize()

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 parameters 
) const
overridevirtual

Build the quadratic LP problem 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 binary (or continuous, depending on MRMFeatureSelector::SelectorParameters::variable_type) variable per feature, then for every neighbour within nn_threshold adds a locality-weighted pairwise term keyed on the expected RT delta. After solving, every column whose value is >= parameters.optimal_threshold contributes its name to result. result is cleared on entry.

Parameters
[in]time_to_namePairs of (retention time, transition name); the order of this vector defines the neighbour sliding window.
[in]feature_name_mapTransition name → its candidate features.
[out]resultNames of the selected features (one per column whose solver value clears optimal_threshold). Cleared on entry.
[in]parametersAlgorithm parameters (nn_threshold, locality_weight, variable_type, score_weights, optimal_threshold, ...).

Implements MRMFeatureSelector.