76 std::map<std::pair<IonType, Size>, std::vector<double> > & observed_intensities,
78 Size number_of_regions
83 Size number_of_regions,
84 Size number_of_intensity_levels,
86 const std::vector<IonType> & ion_types,
87 const std::vector<bool> & is_primary
116 void writeTrainingFile_(std::vector<DescriptorSet> & training_input, std::vector<double> & training_output,
const String& filename);
Representation of a peptide/protein sequence.
Definition: AASequence.h:112
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:72
The representation of a 1D spectrum.
Definition: MSSpectrum.h:70
A more convenient string class.
Definition: String.h:60
Train SVM models that are used by SvmTheoreticalSpectrumGenerator.
Definition: SvmTheoreticalSpectrumGeneratorTrainer.h:67
SvmTheoreticalSpectrumGeneratorTrainer()
Default constructor.
SvmTheoreticalSpectrumGenerator::DescriptorSet DescriptorSet
Definition: SvmTheoreticalSpectrumGeneratorTrainer.h:69
SvmTheoreticalSpectrumGeneratorTrainer & operator=(const SvmTheoreticalSpectrumGeneratorTrainer &tsg)
Assignment operator.
std::map< std::pair< IonType, Size >, std::vector< double > > ObservedIntensMap
Definition: SvmTheoreticalSpectrumGeneratorTrainer.h:70
void countIntensities_(const PeakSpectrum &spectrum, const AASequence &annotation, const IonType &type, std::map< std::pair< IonType, Size >, std::vector< double > > &observed_intensities, double tolerance, Size number_of_regions)
stores the observed intensities for each sector-type combination in a vector
SvmTheoreticalSpectrumGeneratorTrainer(const SvmTheoreticalSpectrumGeneratorTrainer &source)
Copy constructor.
void trainSecondaryTypes_(TextFile &info_outfile, Size number_of_regions, Size number_of_intensity_levels, ObservedIntensMap &observed_intensities, const std::vector< IonType > &ion_types, const std::vector< bool > &is_primary)
trains the Bayesian secondary peak types models
void normalizeIntensity(PeakSpectrum &S) const
Normalizes the intensity of the peaks in the input data.
void writeTrainingFile_(std::vector< DescriptorSet > &training_input, std::vector< double > &training_output, const String &filename)
Write a training file that can be passed to libsvm command line tools.
SvmTheoreticalSpectrumGenerator::IonType IonType
Definition: SvmTheoreticalSpectrumGeneratorTrainer.h:68
void trainModel(const PeakMap &spectra, const std::vector< AASequence > &annotations, const String &filename, Int precursor_charge)
trains an SVM for each ion_type and stores them in files <filename>_residue_loss_charge....
~SvmTheoreticalSpectrumGeneratorTrainer() override
Destructor.
A set of descriptors for a single training row.
Definition: SvmTheoreticalSpectrumGenerator.h:220
This class provides some basic file handling methods for text files.
Definition: TextFile.h:47
int Int
Signed integer type.
Definition: Types.h:102
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:48
nested class
Definition: SvmTheoreticalSpectrumGenerator.h:83