|
OpenMS
2.5.0
|
Go to the documentation of this file.
38 #include <OpenMS/config.h>
47 #include <boost/random/mersenne_twister.hpp>
92 residue((
Residue::ResidueType) 0),
100 residue(local_residue),
108 residue(rhs.residue),
133 return charge < rhs.
charge;
222 return mp_.ion_types;
250 inline void scaleSingleFeature_(
double & value,
double feature_min,
double feature_max,
double lower = -1.0,
double upper = 1.0);
253 void scaleDescriptorSet_(
DescriptorSet & desc,
double lower,
double upper);
262 static void initializeMaps_();
267 void updateMembers_()
override;
273 if (feature_max == feature_min)
278 if (value <= feature_min)
282 else if (value >= feature_max)
288 value = lower + (upper - lower) *
289 (value - feature_min) /
290 (feature_max - feature_min);
295 std::cerr <<
"negative value!! " << value <<
" l: " << lower <<
" u: " << upper <<
" fm: " << feature_min <<
" fma: " << feature_max <<
" prev: " << prev << std::endl;
std::vector< double > intensity_bin_boarders
Definition: SvmTheoreticalSpectrumGenerator.h:184
std::vector< double > intensity_bin_values
Definition: SvmTheoreticalSpectrumGenerator.h:187
std::vector< svm_node > DescriptorSetType
Definition: SvmTheoreticalSpectrumGenerator.h:142
IonType()
Definition: SvmTheoreticalSpectrumGenerator.h:91
std::map< Residue::ResidueType, double > static_intensities
Definition: SvmTheoreticalSpectrumGenerator.h:157
static std::map< String, double > hydrophobicity_
hydrophobicity values for each AA
Definition: SvmTheoreticalSpectrumGenerator.h:238
Train SVM models that are used by SvmTheoreticalSpectrumGenerator.
Definition: SvmTheoreticalSpectrumGeneratorTrainer.h:65
A more convenient string class.
Definition: String.h:58
DescriptorSetType descriptors
Definition: SvmTheoreticalSpectrumGenerator.h:143
std::vector< double > feature_max
Definition: SvmTheoreticalSpectrumGenerator.h:172
Size number_intensity_levels
Definition: SvmTheoreticalSpectrumGenerator.h:166
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
std::vector< boost::shared_ptr< SVMWrapper > > class_models
Definition: SvmTheoreticalSpectrumGenerator.h:151
Residue::ResidueType residue
Definition: SvmTheoreticalSpectrumGenerator.h:84
static std::map< String, double > helicity_
helicity values for each AA
Definition: SvmTheoreticalSpectrumGenerator.h:241
static std::map< String, double > basicity_
basicity values for each AA
Definition: SvmTheoreticalSpectrumGenerator.h:244
Size number_regions
Definition: SvmTheoreticalSpectrumGenerator.h:169
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:91
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
EmpiricalFormula loss
Definition: SvmTheoreticalSpectrumGenerator.h:85
static bool initializedMaps_
flag to indicate if the hydrophobicity, helicity, and basicity maps were already initialized
Definition: SvmTheoreticalSpectrumGenerator.h:265
Representation of a residue.
Definition: Residue.h:61
Simple container storing the model parameters required for simulation.
Definition: SvmTheoreticalSpectrumGenerator.h:148
std::map< IonType, double > IntensityMap
Definition: SvmTheoreticalSpectrumGenerator.h:226
std::map< IonType, std::vector< IonType > > secondary_types
Definition: SvmTheoreticalSpectrumGenerator.h:163
double scaling_upper
Definition: SvmTheoreticalSpectrumGenerator.h:181
Simulates MS2 spectra with support vector machines.
Definition: SvmTheoreticalSpectrumGenerator.h:71
IonType(const IonType &rhs)
Definition: SvmTheoreticalSpectrumGenerator.h:107
const std::vector< IonType > & getIonTypes()
return the set of ion types that are modeled by the loaded SVMs
Definition: SvmTheoreticalSpectrumGenerator.h:220
ResidueType
Definition: Residue.h:150
std::map< std::pair< IonType, Size >, std::vector< std::vector< double > > > conditional_prob
Definition: SvmTheoreticalSpectrumGenerator.h:190
Size precursor_charge_
charge of the precursors used for training
Definition: SvmTheoreticalSpectrumGenerator.h:229
std::vector< IonType > ion_types
Definition: SvmTheoreticalSpectrumGenerator.h:160
std::vector< boost::shared_ptr< SVMWrapper > > reg_models
Definition: SvmTheoreticalSpectrumGenerator.h:154
bool operator<(const IonType &rhs) const
Definition: SvmTheoreticalSpectrumGenerator.h:126
IonType(Residue::ResidueType local_residue, EmpiricalFormula local_loss=EmpiricalFormula(), Int local_charge=1)
Definition: SvmTheoreticalSpectrumGenerator.h:99
Representation of a peptide/protein sequence.
Definition: AASequence.h:113
SvmModelParameterSet mp_
set of model parameters read from model file
Definition: SvmTheoreticalSpectrumGenerator.h:232
void scaleSingleFeature_(double &value, double feature_min, double feature_max, double lower=-1.0, double upper=1.0)
scale value to the interval [lower,max] given the maximal and minimal entries for a feature
Definition: SvmTheoreticalSpectrumGenerator.h:270
static std::map< String, Size > aa_to_index_
map AA to integers
Definition: SvmTheoreticalSpectrumGenerator.h:235
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
nested class
Definition: SvmTheoreticalSpectrumGenerator.h:82
std::map< IonType, bool > hide_type_
whether ion types are hidden or not
Definition: SvmTheoreticalSpectrumGenerator.h:247
Int charge
Definition: SvmTheoreticalSpectrumGenerator.h:86
std::vector< double > feature_min
Definition: SvmTheoreticalSpectrumGenerator.h:175
Size< TNeedle >::Type position(const PatternAuxData< TNeedle > &dh)
Definition: AhoCorasickAmbiguous.h:561
IonType & operator=(const IonType &rhs)
Definition: SvmTheoreticalSpectrumGenerator.h:115
double scaling_lower
Definition: SvmTheoreticalSpectrumGenerator.h:178
A set of descriptors for a single training row.
Definition: SvmTheoreticalSpectrumGenerator.h:140