Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Classes | Protected Member Functions | Protected Attributes | List of all members
PILISCrossValidation Class Reference

Implementation of a cross validation training for the PILIS model. More...

#include <OpenMS/ANALYSIS/ID/PILISCrossValidation.h>

Inheritance diagram for PILISCrossValidation:
DefaultParamHandler

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...
 
PILISCrossValidationoperator= (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...
 
- Public Member Functions inherited from DefaultParamHandler
 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 DefaultParamHandleroperator= (const DefaultParamHandler &rhs)
 Assignment operator. More...
 
virtual bool operator== (const DefaultParamHandler &rhs) const
 Equality operator. More...
 
void setParameters (const Param &param)
 Sets the parameters. More...
 
const ParamgetParameters () const
 Non-mutable access to the parameters. More...
 
const ParamgetDefaults () const
 Non-mutable access to the default parameters. More...
 
const StringgetName () 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 &param, const Map< String, Option > &options, std::vector< Param > &parameters)
 
void updateMembers_ ()
 This method is used to update extra member variables at the end of the setParameters() method. More...
 
- Protected Member Functions inherited from DefaultParamHandler
void defaultsToParam_ ()
 Updates the parameters after the defaults have been set in the constructor. More...
 

Protected Attributes

Map< String, Optioncv_options_
 
PeakSpectrumCompareFunctorpscf_
 
- Protected Attributes inherited from DefaultParamHandler
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< Stringsubsections_
 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...
 

Detailed Description

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:

NameTypeDefaultRestrictionsDescription
nfold int10  Number of partitions to use for cross validation
optimization_method stringtophit_against_all_others tophit_against_all_others, only_top_hit, top_n_ions, top_n_ions_byScoring method used for optimization
compare_function stringSpectrumAlignmentScore SpectrumAlignmentScore, ZhangSimilarityScoreSpectra scoring function to use
num_top_peaks int2  Number of highest abundant peaks to consider with top_n_ion and top_n_ions_by optimization_methods
min_intensity float0.3  Min relative intensity of highest abundant peaks to consider in top_n_ions_by
fragment_mass_tolerance float0.5  Fragment mass tolerance, mainly used in compare function.
normalize_to_TIC stringtrue true, falseWhether the spectra should be normalized to TIC before training, to max of one otherwise.

Note:

Constructor & Destructor Documentation

Default constructor.

copy constructor

virtual ~PILISCrossValidation ( )
virtual

destructor

Member Function Documentation

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

void generateParameters_ ( const Param param,
const Map< String, Option > &  options,
std::vector< Param > &  parameters 
)
protected
PILISCrossValidation& operator= ( const PILISCrossValidation rhs)

assignment operator

void partition_ ( std::vector< std::vector< Peptide > > &  parts,
const std::vector< Peptide > &  source 
)
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

double scoreSpectra_ ( const RichPeakSpectrum spec1,
const RichPeakSpectrum spec2 
)
protected
void setOption ( const String name,
const Option option 
)
inline

sets a option to be used for the cross validation

void setOptions ( const Map< String, Option > &  rhs)
inline

sets the options which should be used for the cross validation

void updateMembers_ ( )
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.

Member Data Documentation

Map<String, Option> cv_options_
protected
PeakSpectrumCompareFunctor* pscf_
protected

OpenMS / TOPP release 2.0.0 Documentation generated on Tue Aug 25 2015 05:54:05 using doxygen 1.8.9.1