36 #ifndef OPENMS_CHEMISTRY_SVMTHEORETICALSPECTRUMGENERATOR_H 
   37 #define OPENMS_CHEMISTRY_SVMTHEORETICALSPECTRUMGENERATOR_H 
   39 #include <OpenMS/config.h> 
   43 #include <boost/smart_ptr.hpp> 
   90         residue((
Residue::ResidueType) 0),
 
  106         residue(rhs.residue),
 
  131           return charge < rhs.
charge;
 
  188       std::map<std::pair<IonType, Size>, std::vector<std::vector<DoubleReal> > > 
conditional_prob;
 
  220       return mp_.ion_types;
 
  248     inline void scaleSingleFeature_(
double & value, 
double feature_min, 
double feature_max, 
double lower = -1.0, 
double upper = 1.0);
 
  251     void scaleDescriptorSet_(
DescriptorSet & desc, 
double lower, 
double upper);
 
  260     static void initializeMaps_();
 
  265     void updateMembers_();
 
  271     if (feature_max == feature_min)
 
  276     if (value <= feature_min)
 
  280     else if (value >= feature_max)
 
  286       value = lower + (upper - lower) *
 
  287               (value - feature_min) /
 
  288               (feature_max - feature_min);
 
  293       std::cerr << 
"negative value!! " << value << 
"  l: " << lower << 
" u: " << upper << 
" fm: " << feature_min << 
" fma: " << feature_max << 
"  prev: " << prev << std::endl;
 
  299 #endif // #ifdef OPENMS_CHEMISTRY_SVMTHEORETICALSPECTRUMGENERATORTRAINER_H 
nested class 
Definition: SvmTheoreticalSpectrumGenerator.h:80
static std::map< String, Size > aa_to_index_
map AA to integers 
Definition: SvmTheoreticalSpectrumGenerator.h:233
static std::map< String, DoubleReal > basicity_
basicity values for each AA 
Definition: SvmTheoreticalSpectrumGenerator.h:242
A more convenient string class. 
Definition: String.h:56
std::map< IonType, std::vector< IonType > > secondary_types
Definition: SvmTheoreticalSpectrumGenerator.h:161
Size number_regions
Definition: SvmTheoreticalSpectrumGenerator.h:167
double scaling_upper
Definition: SvmTheoreticalSpectrumGenerator.h:179
std::vector< DoubleReal > feature_min
Definition: SvmTheoreticalSpectrumGenerator.h:173
IonType()
Definition: SvmTheoreticalSpectrumGenerator.h:89
std::map< IonType, DoubleReal > IntensityMap
Definition: SvmTheoreticalSpectrumGenerator.h:224
Residue::ResidueType residue
Definition: SvmTheoreticalSpectrumGenerator.h:82
Representation of a peptide/protein sequence. 
Definition: AASequence.h:84
std::vector< svm_node > DescriptorSetType
Definition: SvmTheoreticalSpectrumGenerator.h:140
Representation of a residue. 
Definition: Residue.h:64
std::map< Residue::ResidueType, DoubleReal > static_intensities
Definition: SvmTheoreticalSpectrumGenerator.h:155
Simulates ms2 spectra with support vector machines. 
Definition: SvmTheoreticalSpectrumGenerator.h:69
EmpiricalFormula loss
Definition: SvmTheoreticalSpectrumGenerator.h:83
Simple container storing the model parameters required for simulation. 
Definition: SvmTheoreticalSpectrumGenerator.h:146
std::vector< DoubleReal > intensity_bin_boarders
Definition: SvmTheoreticalSpectrumGenerator.h:182
Train SVM models that are used by SvmTheoreticalSpectrumGenerator. 
Definition: SvmTheoreticalSpectrumGeneratorTrainer.h:62
A set of descriptors for a single training row. 
Definition: SvmTheoreticalSpectrumGenerator.h:138
static bool initializedMaps_
flag to indicate if the hydrophobicity, helicity, and basicity maps were already initialized ...
Definition: SvmTheoreticalSpectrumGenerator.h:263
IonType(const IonType &rhs)
Definition: SvmTheoreticalSpectrumGenerator.h:105
std::vector< boost::shared_ptr< SVMWrapper > > reg_models
Definition: SvmTheoreticalSpectrumGenerator.h:152
void scaleSingleFeature_(double &value, double feature_min, double feature_max, double lower=-1.0, double upper=1.0)
scale value to the intervall [lower,max] given the maximal and minimal entries for a feature ...
Definition: SvmTheoreticalSpectrumGenerator.h:268
const std::vector< IonType > & getIonTypes()
return the set of ion types that are modeled by the loaded SVMs 
Definition: SvmTheoreticalSpectrumGenerator.h:218
std::vector< DoubleReal > feature_max
Definition: SvmTheoreticalSpectrumGenerator.h:170
ResidueType
Definition: Residue.h:361
size_t Size
Size type e.g. used as variable which can hold result of size() 
Definition: Types.h:144
std::vector< boost::shared_ptr< SVMWrapper > > class_models
Definition: SvmTheoreticalSpectrumGenerator.h:149
Size precursor_charge_
charge of the precursors used for training 
Definition: SvmTheoreticalSpectrumGenerator.h:227
DescriptorSetType descriptors
Definition: SvmTheoreticalSpectrumGenerator.h:141
SvmModelParameterSet mp_
set of model parameters read from model file 
Definition: SvmTheoreticalSpectrumGenerator.h:230
std::vector< DoubleReal > intensity_bin_values
Definition: SvmTheoreticalSpectrumGenerator.h:185
std::map< IonType, bool > hide_type_
whether ion types are hidden or not 
Definition: SvmTheoreticalSpectrumGenerator.h:245
A base class for all classes handling default parameters. 
Definition: DefaultParamHandler.h:90
Size number_intensity_levels
Definition: SvmTheoreticalSpectrumGenerator.h:164
Int charge
Definition: SvmTheoreticalSpectrumGenerator.h:84
IonType & operator=(const IonType &rhs)
Definition: SvmTheoreticalSpectrumGenerator.h:113
int Int
Signed integer type. 
Definition: Types.h:100
std::map< std::pair< IonType, Size >, std::vector< std::vector< DoubleReal > > > conditional_prob
Definition: SvmTheoreticalSpectrumGenerator.h:188
IonType(Residue::ResidueType residue, EmpiricalFormula loss=EmpiricalFormula(), Int charge=1)
Definition: SvmTheoreticalSpectrumGenerator.h:97
bool operator<(const IonType &rhs) const 
Definition: SvmTheoreticalSpectrumGenerator.h:124
static std::map< String, DoubleReal > hydrophobicity_
hydrophobicity values for each AA 
Definition: SvmTheoreticalSpectrumGenerator.h:236
static std::map< String, DoubleReal > helicity_
helicity values for each AA 
Definition: SvmTheoreticalSpectrumGenerator.h:239
std::vector< IonType > ion_types
Definition: SvmTheoreticalSpectrumGenerator.h:158
double scaling_lower
Definition: SvmTheoreticalSpectrumGenerator.h:176