35 #ifndef OPENMS_MATH_STATISTICS_POSTERIORERRORPROBABILITYMODEL_H
36 #define OPENMS_MATH_STATISTICS_POSTERIORERRORPROBABILITYMODEL_H
80 bool fit(std::vector<double> & search_engine_scores);
89 bool fit(std::vector<double> & search_engine_scores, std::vector<double> & probabilities);
92 void fillDensities(std::vector<double> & x_scores, std::vector<DoubleReal> & incorrect_density, std::vector<DoubleReal> & correct_density);
94 DoubleReal computeMaxLikelihood(std::vector<DoubleReal> & incorrect_density, std::vector<DoubleReal> & correct_density);
96 DoubleReal one_minus_sum_post(std::vector<DoubleReal> & incorrect_density, std::vector<DoubleReal> & correct_density);
98 DoubleReal sum_post(std::vector<DoubleReal> & incorrect_density, std::vector<DoubleReal> & correct_density);
100 DoubleReal sum_pos_x0(std::vector<double> & x_scores, std::vector<DoubleReal> & incorrect_density, std::vector<DoubleReal> & correct_density);
102 DoubleReal sum_neg_x0(std::vector<double> & x_scores, std::vector<DoubleReal> & incorrect_density, std::vector<DoubleReal> & correct_density);
104 DoubleReal sum_pos_sigma(std::vector<double> & x_scores, std::vector<DoubleReal> & incorrect_density, std::vector<DoubleReal> & correct_density,
DoubleReal positive_mean);
106 DoubleReal sum_neg_sigma(std::vector<double> & x_scores, std::vector<DoubleReal> & incorrect_density, std::vector<DoubleReal> & correct_density,
DoubleReal positive_mean);
112 return correctly_assigned_fit_param_;
118 return incorrectly_assigned_fit_param_;
124 return negative_prior_;
130 return params.
A * exp(-1.0 * pow(x - params.
x0, 2) / (2 * pow(params.
sigma, 2)));
137 return (z * exp(-1 * z)) / params.
sigma;
147 TextFile * InitPlots(std::vector<double> & x_scores);
159 void plotTargetDecoyEstimation(std::vector<double> & target, std::vector<double> & decoy);
164 return smallest_score_;
197 #endif // OPENMS_MATH_STATISTICS_POSTERIORERRORPROBABILITYMODEL_H
A more convenient string class.
Definition: String.h:56
DoubleReal getNegativePrior() const
returns the estimated negative prior probability.
Definition: PosteriorErrorProbabilityModel.h:122
DoubleReal smallest_score_
smallest score which was used for fitting the model
Definition: PosteriorErrorProbabilityModel.h:183
DoubleReal getGumbel(DoubleReal x, const GaussFitter::GaussFitResult ¶ms)
computes the gumbel density at position x with parameters params.
Definition: PosteriorErrorProbabilityModel.h:134
double x0
parameter x0 of gaussian distribution (left/right shift)
Definition: GaussFitter.h:79
double sigma
parameter sigma of gaussian distribution (width)
Definition: GaussFitter.h:82
GaussFitter::GaussFitResult incorrectly_assigned_fit_param_
stores parameters for incorrectly assigned sequences. If gumbel fit was used, A can be ignored...
Definition: PosteriorErrorProbabilityModel.h:173
double A
parameter A of gaussian distribution (amplitude)
Definition: GaussFitter.h:76
DoubleReal getSmallestScore()
returns the smallest score used in the last fit
Definition: PosteriorErrorProbabilityModel.h:162
GaussFitter::GaussFitResult getCorrectlyAssignedFitResult() const
returns estimated parameters for correctly assigned sequences. Fit should be used before...
Definition: PosteriorErrorProbabilityModel.h:110
DoubleReal getGauss(DoubleReal x, const GaussFitter::GaussFitResult ¶ms)
computes the gaussian density at position x with parameters params.
Definition: PosteriorErrorProbabilityModel.h:128
GaussFitter::GaussFitResult correctly_assigned_fit_param_
stores gauss parameters
Definition: PosteriorErrorProbabilityModel.h:175
DoubleReal negative_prior_
stores final prior probability for negative peptides
Definition: PosteriorErrorProbabilityModel.h:177
struct of parameters of a gaussian distribution
Definition: GaussFitter.h:71
Implements a mixture model of the inverse gumbel and the gauss distribution or a gaussian mixture...
Definition: PosteriorErrorProbabilityModel.h:63
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:90
GaussFitter::GaussFitResult getIncorrectlyAssignedFitResult() const
returns estimated parameters for correctly assigned sequences. Fit should be used before...
Definition: PosteriorErrorProbabilityModel.h:116
This class provides some basic file handling methods for text files.
Definition: TextFile.h:47
DoubleReal max_correctly_
peak of the gauss distribution (correctly assigned sequences)
Definition: PosteriorErrorProbabilityModel.h:181
double DoubleReal
Double-precision real type.
Definition: Types.h:118
DoubleReal max_incorrectly_
peak of the incorrectly assigned sequences distribution
Definition: PosteriorErrorProbabilityModel.h:179