Implementation of a cross validation training for the PILIS model. More...
#include <OpenMS/ANALYSIS/ID/PILISCrossValidation.h>
Classes | |
struct | Option |
This struct represents a cross validation option. More... | |
struct | Peptide |
this struct represents a peptide spectrum pair More... | |
Public Member Functions | |
Constructors and destructors | |
PILISCrossValidation () | |
Default constructor. More... | |
PILISCrossValidation (const PILISCrossValidation &rhs) | |
copy constructor More... | |
virtual | ~PILISCrossValidation () |
destructor More... | |
PILISCrossValidation & | operator= (const PILISCrossValidation &rhs) |
assignment operator More... | |
Accessors | |
void | setOptions (const Map< String, Option > &rhs) |
sets the options which should be used for the cross validation More... | |
void | setOption (const String &name, const Option &option) |
sets a option to be used for the cross validation More... | |
void | apply (Param &PILIS_param, const PILISModel &base_model, const std::vector< Peptide > &peptides) |
performs a cross validation and write optimized param into PILIS_param More... | |
double | scoreHits (const std::vector< std::vector< std::vector< RichPeakSpectrum > > > &sim_spectra, const std::vector< std::vector< RichPeakSpectrum > > &exp_spectra) |
compares experimental and simulated spectra and returns a score More... | |
![]() | |
DefaultParamHandler (const String &name) | |
Constructor with name that is displayed in error messages. More... | |
DefaultParamHandler (const DefaultParamHandler &rhs) | |
Copy constructor. More... | |
virtual | ~DefaultParamHandler () |
Destructor. More... | |
virtual DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
Assignment operator. More... | |
virtual bool | operator== (const DefaultParamHandler &rhs) const |
Equality operator. More... | |
void | setParameters (const Param ¶m) |
Sets the parameters. More... | |
const Param & | getParameters () const |
Non-mutable access to the parameters. More... | |
const Param & | getDefaults () const |
Non-mutable access to the default parameters. More... | |
const String & | getName () const |
Non-mutable access to the name. More... | |
void | setName (const String &name) |
Mutable access to the name. More... | |
const std::vector< String > & | getSubsections () const |
Non-mutable access to the registered subsections. More... | |
Protected Member Functions | |
double | scoreSpectra_ (const RichPeakSpectrum &spec1, const RichPeakSpectrum &spec2) |
void | partition_ (std::vector< std::vector< Peptide > > &parts, const std::vector< Peptide > &source) |
void | generateParameters_ (const Param ¶m, const Map< String, Option > &options, std::vector< Param > ¶meters) |
void | updateMembers_ () |
This method is used to update extra member variables at the end of the setParameters() method. More... | |
![]() | |
void | defaultsToParam_ () |
Updates the parameters after the defaults have been set in the constructor. More... | |
Protected Attributes | |
Map< String, Option > | cv_options_ |
PeakSpectrumCompareFunctor * | pscf_ |
![]() | |
Param | param_ |
Container for current parameters. More... | |
Param | defaults_ |
Container for default parameters. This member should be filled in the constructor of derived classes! More... | |
std::vector< String > | subsections_ |
Container for registered subsections. This member should be filled in the constructor of derived classes! More... | |
String | error_name_ |
Name that is displayed in error messages during the parameter checking. More... | |
bool | check_defaults_ |
If this member is set to false no checking if parameters in done;. More... | |
bool | warn_empty_defaults_ |
If this member is set to false no warning is emitted when defaults are empty;. More... | |
Implementation of a cross validation training for the PILIS model.
This class serves as an implementation of a cross validation training for the PILIS model. It includes a range of parameters which can be set to perform a GridSearch additionally.
Parameters of this class are:Name | Type | Default | Restrictions | Description |
---|---|---|---|---|
nfold | int | 10 | Number of partitions to use for cross validation | |
optimization_method | string | tophit_against_all_others | tophit_against_all_others, only_top_hit, top_n_ions, top_n_ions_by | Scoring method used for optimization |
compare_function | string | SpectrumAlignmentScore | SpectrumAlignmentScore, ZhangSimilarityScore | Spectra scoring function to use |
num_top_peaks | int | 2 | Number of highest abundant peaks to consider with top_n_ion and top_n_ions_by optimization_methods | |
min_intensity | float | 0.3 | Min relative intensity of highest abundant peaks to consider in top_n_ions_by | |
fragment_mass_tolerance | float | 0.5 | Fragment mass tolerance, mainly used in compare function. | |
normalize_to_TIC | string | true | true, false | Whether the spectra should be normalized to TIC before training, to max of one otherwise. |
Default constructor.
PILISCrossValidation | ( | const PILISCrossValidation & | rhs | ) |
copy constructor
|
virtual |
destructor
void apply | ( | Param & | PILIS_param, |
const PILISModel & | base_model, | ||
const std::vector< Peptide > & | peptides | ||
) |
performs a cross validation and write optimized param into PILIS_param
|
protected |
PILISCrossValidation& operator= | ( | const PILISCrossValidation & | rhs | ) |
assignment operator
|
protected |
double scoreHits | ( | const std::vector< std::vector< std::vector< RichPeakSpectrum > > > & | sim_spectra, |
const std::vector< std::vector< RichPeakSpectrum > > & | exp_spectra | ||
) |
compares experimental and simulated spectra and returns a score
|
protected |
sets a option to be used for the cross validation
sets the options which should be used for the cross validation
|
protectedvirtual |
This method is used to update extra member variables at the end of the setParameters() method.
Also call it at the end of the derived classes' copy constructor and assignment operator.
The default implementation is empty.
Reimplemented from DefaultParamHandler.
|
protected |
OpenMS / TOPP release 2.0.0 | Documentation generated on Sat May 16 2015 16:14:02 using doxygen 1.8.9.1 |